Commit Graph

89 Commits

Author SHA1 Message Date
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
David E. O'Brien
d9a447559b Sync with HEAD. 2013-02-08 16:10:16 +00:00
Mikolaj Golub
3cfa2135c5 Change iostat -Ix to display total duration of transactions instead
of average duration, and total busy time instead of %.

This looks more useful when one runs `iostat -Ix` periodically to
collect statistics: e.g. now it is possible to calculate busy %
between two runs subtracting total busy times and dividing per time
period.

Average duration and % busy are still available via `iostat -x`.
2012-12-15 18:21:09 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Dimitry Andric
cfed15e6c5 In usr.sbin/iostat/iostat.c, use printf format specifiers from
inttypes.h for u_int64_t's.  While here, sort #include directives.

MFC after:	1 week
2011-12-17 20:25:23 +00:00
Joel Dahl
914e11a72b Remove the advertising clause from UCB copyrighted files in usr.sbin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
2010-12-11 09:38:12 +00:00
Yaroslav Tykhiy
43b98c2b52 Clarify a few details about iostat(8) behavior:
- The default repeat count for iostat(8) is 1 unless there
  was a -w on the command line.

- A -x display doesn't include TTY or CPU stats by default
  but they can be turned on with a -T or -C, respectively.

Submitted by:	arundel (initial version)
Reviewed by:	arundel
MFC after:	1 week
2010-11-24 00:05:19 +00:00
Ivan Voras
51e5e45458 Change "wait" banner to "qlen" to be more indicative of its purpose and to
be more inline with what gstat uses.

Reviewed by:	gnn
Silence from:	phk, keramida
2010-11-17 15:12:10 +00:00
Yaroslav Tykhiy
0d0699a172 Clean up the style and markup of the paragraph on fractional wait intervals.
MFC after:	3 days
2010-08-07 11:48:31 +00:00
Yaroslav Tykhiy
4eac7ff119 Properly spell and mark up the name of kern.hz.
MFC after:	3 days
2010-08-07 11:32:17 +00:00
Yaroslav Tykhiy
40f2ad794d Move the sentences telling the defaults for -c and -w
to where they belong.  Previously they were misplaced,
i.e., swapped.

MFC after:	3 days
2010-08-07 11:13:50 +00:00
Sean Bruno
b72df67bb4 Cleanup manpage as suggested by jhb@ to start new sentences on a new line.
MFC after:	2 Weeks
2010-05-24 16:42:53 +00:00
Sean Bruno
f1a178a2a0 Explain how the new sub-second interval from changeset:208389 works.
Approved by:	scottl(mentor)
Obtained from:	Yahoo Inc.
MFC after:	2 weeks
2010-05-23 19:48:54 +00:00
Sean Bruno
8b10473d30 Allow sub-second interval timings for iostat and vmstat.
e.g.
vmstat -w.5
iostat -w.5

Reviewed by:	jhb
Approved by:	scottl (mentor)
Obtained from:	Yahoo Inc.
MFC after:	2 weeks
2010-05-21 17:10:52 +00:00
Ed Schouten
71ccf09269 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
Giorgos Keramidas
bc5980cb6c iostat: add a bit of space between tty in/out columns
The columns for tty input and output may bump against each other
if the tty output needs more than 5 columns.  Add a bit of space
that pushes everything 1 column to the right, but also avoids the
problem.

Approved by:	re (rwatson)
2009-08-15 17:57:21 +00:00
Xin LI
4f6e13686b Use calloc(). 2009-05-21 23:00:20 +00:00
Adrian Chadd
ab8ac08e14 Fix the device name spacing.
The old logic padded the device name out but assumed the unit number was one digit
long; this fails for things like SATA devices which (for me) begin at ad10.

Assemble the full device name in a temporary buffer and then calcluate padding
based on that string.
2008-09-11 09:55:54 +00:00
John Baldwin
32c9e3bd01 Use kvm_getcptime(3) to fetch the global CPU time stats from a crashdump
since the 'cp_time' symbol doesn't exist in recent kernels.  This fixes
iostat and vmstat on crash dumps.

MFC after:	1 week
2008-08-19 21:33:09 +00:00
John Baldwin
9e5fbab2a2 Pass the right pointer to bzero() when clearing cp_time.
MFC after:	1 week
2008-08-19 20:33:59 +00:00
Giorgos Keramidas
53fbcd3a78 Repeat iostat header after rows-3 instead of a hardcoded 20.
Use ioctl() to get the window size in iostat(8), and force a new
header to be prepended to the output every time the current
window size changes.  Change the number of lines before each
header to `rows - 3' when the terminal is resized, so that the
full terminal length can be used for output lines.

PR:		bin/119705
Submitted by:	keramida
Approved by:	maxim
MFC after:	2 weeks
2008-01-22 11:18:51 +00:00
Maxim Konovalov
e08b1089a6 o Fix a typo. errx() -> err().
Submitted by:	das
2008-01-12 20:57:19 +00:00
Maxim Konovalov
38992545b7 o Plug a memory leak: do not forget to free asprintf(3) allocated
memory.

PR:		bin/119608
Submitted by:	peter.schuller
MFC after:	1 week
2008-01-12 20:37:06 +00:00
Maxim Konovalov
5b68ad556b o Get missed "%" in output back.
Submitted by:	sem
MFC after:	1 week
2007-12-16 07:18:59 +00:00
Maxim Konovalov
dd9bccc479 o With -x switch do not pay attention at the hardcoded limit of 3 devices and dump stats for all devices in the system. User can still limit iostat -x by -n switch.
Spotted by:	Igor Sysoev
Submitted by:	kensmith
Approved by:	re (kensmith)
MFC after:	2 weeks
2007-08-03 15:45:55 +00:00
Maxim Konovalov
beda5f787a o Re-indent long lines.
Style(9) wisdom from:	bde
2007-05-14 18:04:07 +00:00
Maxim Konovalov
fbe4fc2ec0 o Fix several style bugs in the previous commit.
Prodded by:	bde
2007-05-12 16:42:01 +00:00
Maxim Konovalov
30ff126652 o Make iostat -Ix work: print per-interval I/O extended statistics.
PR:		bin/112559
Submitted by:	Dan Nelson
MFC after:	2 weeks
2007-05-12 09:28:34 +00:00
John Baldwin
8d56a4caf9 Make iostat(8) fully work on crash dumps again (broken since 5.0):
- Pass the address of the variable we are reading to kvm_read() rather
  than the index into the nlist array.
- Properly report errors from kvm_read() which returns -1 on error, not
  0.

MFC after:	3 days
2007-02-06 20:29:40 +00:00
Ruslan Ermilov
bc84aa4ba3 Markup fixes. 2006-09-29 17:57:04 +00:00
Maxim Konovalov
47e065b48f o De-register local vars. 2006-04-16 22:30:24 +00:00
Maxim Konovalov
3b5ca369a1 o Trim EOL whitespaces and tabs, replace eight w/s by tabs.
No functional changes.
2006-04-16 22:28:04 +00:00
Maxim Konovalov
6c3591233a o Implement Solaris-like -x flag: show extended disk statistics.
o Implement Solaris-like -z flag: omit lines for devices with no activity.
o iostat.8: describe -x and -z flags, Xr devstat(3), touch .Dd.

PR:		mostly bin/68840, with style changes; bin/73327
Submitted by:	Dan Nelson, Peter Schuller
Obtained from:	NetBSD (a part of man page)
MFC after:	1 month
2006-04-16 22:23:39 +00:00
Giorgos Keramidas
26d8ca837e Interlink systat(1), iostat(8) and vmstat(8) through their SEE ALSO
sections, so that users of one can learn about the others easily.
2005-05-26 17:54:16 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Ruslan Ermilov
59a3c79da6 Sort sections. 2005-01-18 20:02:45 +00:00
Ruslan Ermilov
80c49332e2 Put libdevstat before libkvm, because the former depends on the latter. 2004-02-04 10:20:43 +00:00
Kenneth D. Merry
50a7fdaed8 Remove MAINTAINER= lines in the makefiles for camcontrol, iostat, libcam
and libdevstat, since the new way of doing things is to just list
maintainership in src/MAINTAINERS.

Also, remove duplicate entries in src/MAINTAINERS for those utilities.  I
already had entries for them.
2003-06-14 05:28:01 +00:00
David E. O'Brien
052238b16c style.Makefile(5) 2003-04-04 17:49:21 +00:00
Poul-Henning Kamp
7194d335cf Run a revision of the devstat interface:
Kernel:

Change statistics to use the *uptime() timescale (ie: relative to
boottime) rather than the UTC aligned timescale.  This makes the
device statistics code oblivious to clock steps.

Change timestamps to bintime format, they are cheaper.

Remove the "busy_count", and replace it with two counter fields:
"start_count" and "end_count", which are updated in the down and
up paths respectively.  This removes the locking constraint on
devstat.

Add a timestamp argument to devstat_start_transaction(), this will
normally be a timestamp set by the *_bio() function in bp->bio_t0.
Use this field to calculate duration of I/O operations.

Add two timestamp arguments to devstat_end_transaction(), one is
the current time, a NULL pointer means "take timestamp yourself",
the other is the timestamp of when this transaction started (see
above).

Change calculation of busy_time to operate on "the salami principle":
Only when we are idle, which we can determine by the start+end
counts being identical, do we update the "busy_from" field in the
down path.  In the up path we accumulate the timeslice in busy_time
and update busy_from.

Change the byte_* and num_* fields into two arrays: bytes[] and
operations[].

Userland:

Change the misleading "busy_time" name to be called "snap_time" and
make the time long double since that is what most users need anyway,
fill it using clock_gettime(CLOCK_MONOTONIC) to put it on the same
timescale as the kernel fields.

Change devstat_compute_etime() to operate on struct bintime.

Remove the version 2 legacy interface: the change to bintime makes
compatibility far too expensive.

Fix a bug in systat's "vm" page where boot relative busy times would
be bogus.

Bump __FreeBSD_version to 500107

Review & Collaboration by:	ken
2003-03-15 21:59:06 +00:00
Poul-Henning Kamp
190ff54ebb Add #include <sys/resource.h>
My apologies for missing these #includes, I must have confused the
dependencies with a wrong timestamp or something.
2003-02-16 16:01:52 +00:00
Poul-Henning Kamp
f341ca9891 Remove #include <sys/dkstat.h> 2003-02-16 14:13:23 +00:00
Jens Schweikhardt
57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
Tom Rhodes
26b848c3d7 MFS: Spelling: s/transfered/transferred/
PR:		46104
Pointed out by:	Rich Morin <rdm@cfcl.com>
Approved by:	re (rwatson)
2002-12-12 15:38:07 +00:00
Bruce Evans
8fa6b8a8b6 Use essentially the same formatting of the CPU stats percentages as in
vmstat so that they never coalesce.  Both iostat and vmstat need larger
fixes to prevent wide fields from unnecessarily messing up the alignment
of all subsequent fields.

PR:		41674
MFC-after:	3 days
2002-08-18 17:51:14 +00:00
Bruce Evans
2757068e4f Include <nlist.h> for nlist interfaces instead of depending on namespace
pollution in <kvm.h>.
2002-08-18 17:35:55 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Josef Karthauser
1063e12617 Replace /kernel with /boot/kernel/kernel.
PR:		docs/37757
Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-05-09 11:47:42 +00:00
Guido van Rooij
775b007440 Redo patch in 1.22 such that the header printing is reset when the
process gets a SIGCONT

Reviewed by:	kris@freebs.org
MFC after:	2 weeks
2001-09-26 19:35:03 +00:00
Kris Kennaway
e65cded7f3 Don't do unsafe activities in the syscall handler.
MFC after:	2 weeks
2001-09-01 07:40:19 +00:00