christos
5f1a365390
add parens.
2007-06-24 23:25:13 +00:00
simonb
53211cb1ae
Since the swapping of tk_nin and tk_nout was moved to its own
...
function (tkswap()), actually call this function.
Fixes problems where the tin/tout fields showed total tty IO since
boot instead of just what has happened in the last second.
2006-07-26 03:33:02 +00:00
yamt
8613dc06f0
update a comment.
2006-04-21 13:46:37 +00:00
blymn
906131e6f3
Update to use the new kernel io statistics.
2006-04-14 13:14:57 +00:00
dsl
9f26f448bf
Need to read and swap cpustats separately from the dkstats.
...
I wonder how many more programs use the code in vmstat/dkstats.c
2006-02-12 22:11:54 +00:00
yamt
16b7c5d1dd
print a header on each outputs if and only if the output has 2 or more lines.
2006-02-12 11:23:31 +00:00
yamt
895fec49e1
reset hdrcnt whenever printing a header.
2006-01-08 08:47:16 +00:00
blymn
132bb1fe89
Add tape statistics.
2005-08-07 12:32:38 +00:00
mrg
d6989eccf4
apply the patch from PR#30680: always print the header in extended
...
(-x) mode, as it is much easier to see what is going on.
2005-07-07 22:31:45 +00:00
dsl
cfe7f80ff0
Add (unsigned char) cast to ctype functions
2004-10-29 20:51:11 +00:00
dbj
c4278791eb
for -x -I output, use just MB instead of MB/s in header
2004-02-25 03:39:14 +00:00
wiz
d20841bb64
Uppercase CPU, plural is CPUs.
2004-02-13 11:36:08 +00:00
agc
326b2259b7
Move UCB-licensed code from 4-clause to 3-clause licence.
...
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
mrg
134561f7df
- convert header() away from a signal function (it does all sorts of stdio
...
and more) and use a little sig_header() helper.
- in selectdrives() make sure we don't overwrite some arrays. this makes
"iostat 1" work again on my really wide screens where defdrives (number that
can fit) was > ndrives (number of drives), rather than dump core trying to
print (char *)1...
2003-08-04 01:05:44 +00:00
simonb
c71be29ffd
Use the terminal width to choose the default number of drives listed.
...
Suggested by matt green and (indirectly) enami tsugutomo.
2003-07-02 13:47:57 +00:00
simonb
329fb18071
Pinch code from vmstat to get the number of lines of the terminal, and
...
show the header once per screen instead of fixed at every 22 lines.
2003-07-02 13:20:14 +00:00
simonb
2f35689ef7
Bump the width of the MB/s and t/s fields and show only 3 drives by
...
default. The default display now fits in 80 columns, and looks much
better on modern systems.
2003-07-02 08:35:48 +00:00
drochner
96b62d8a69
no need to #include <sys/dkstat.h>
2003-06-11 17:26:31 +00:00
wiz
1f2ca5e686
Increase width now we mention flag arguments.
2003-05-01 15:29:24 +00:00
jmmv
bee0be0e17
In the options list, show which ones require an argument.
...
New sentence, new line.
2003-05-01 15:10:58 +00:00
wiz
c434363e30
Bump date for recent change.
2003-03-17 08:16:10 +00:00
enami
70378aeac7
- Account the number of lines consumed so that -xw displays header
...
frequently enough.
- As we are initializing dk_select to 0 (via dkinit), no need to check it.
- Re-order the code in display() to highlight the fact that -x is
exclusive with others.
- If user really specified some drives and none of them are found,
just bail out rather than falling back to default behaviour.
- Other misc. cosmetic changes while I'm here.
2003-03-01 07:40:58 +00:00
enami
51a7567d63
Sync with the behaviour change.
2003-03-01 07:35:41 +00:00
christos
d0ee51001e
PR/20435: KOIE Hidetaka: iostat -x ignores drive selection.
2003-03-01 05:38:11 +00:00
enami
0ad4042cc2
... and fix typos which makes wrong display.
2002-11-02 06:35:30 +00:00
enami
a65c9b21f2
Cosmetic changes.
2002-11-02 06:32:10 +00:00
simonb
c79652b287
Print a newline between lines in -x mode.
2002-11-01 14:02:21 +00:00
mrg
3cf4c73d05
iostat(8) and systat(8) support for separate read/write disk statistics.
...
"iostat -x" now shows these (ala linux/solaris), but this is only splitting
the read/write bytes/transactions, not adding any new metrics. "systat
iostat" now has two new commands to switch between combined/separate mode
for both it's numbers & bar modes.
2002-11-01 12:47:55 +00:00
mycroft
7f79942c2d
select() -> nanosleep()
2002-09-18 23:18:44 +00:00
lukem
17d72c8a6b
use NETBSDSRCDIR as appropriate
2002-09-18 03:54:26 +00:00
sommerfeld
f80c7eebd7
Since the KERN_CP_TIME sysctl reports total clock ticks across all
...
cpus and hz is measured in ticks per cpu, divide tick count by ncpu to
determine elapsed time since last sample.
Fixes I/O rate deflation observed on multiprocessors.
2002-06-30 00:10:33 +00:00
simonb
c9e9cab056
We don't need the code to discard setgid privileges if we aren't setgid!
2002-05-22 13:12:27 +00:00
jmc
1347ab1b90
Remove check for sparc64 which adds -msoft-quad-float as that is now the
...
default for the compiler on sparc64.
2002-03-28 09:58:09 +00:00
simonb
f69ac131ba
Drop the setgid'ness now that ../../usr.bin/vmstat/dkstats.c uses
...
sysctls now.
2002-01-28 02:16:56 +00:00
wiz
dd75462fd1
Uppercase cpu.
2001-07-08 18:19:16 +00:00
wiz
7da30c83ac
Change xref for vmstat(8) to vmstat(1).
...
Whitespace, punctuation and spelling fixes while I'm here.
2001-05-06 23:48:31 +00:00
mrg
f0c3971950
use -msoft-quad-float on the sparc64.
2001-02-04 14:42:31 +00:00
simonb
0833efd07d
Remove extern variables and functions now declared in dkstats.h.
2000-12-01 02:10:22 +00:00
simonb
80bd9216d2
ANSIfy.
2000-11-30 23:59:03 +00:00
thorpej
ae67003975
Need to include <sys/sched.h> to get cp_time-related constants.
2000-06-03 21:00:42 +00:00
simonb
f28c3652ea
Use " %2.0f" instead of "%3.0f" to print out the CPU percentages - this
...
way 100 in a column doesn't merge into the previous column.
2000-05-29 11:33:43 +00:00
tron
e6523d9b6c
Don't unnecessarily check device names if "-x" is used.
1999-09-13 16:59:54 +00:00
tron
6c817dd128
Display all drives if "iostat -x <interval>" is used.
...
Fixes PR bin/8389 by Mattias Pantzare.
1999-09-13 16:56:35 +00:00
mjl
0f3963f273
Truncate disk names in header to 7 instead of 3 chars, we actually
...
have "raid0".
1999-06-27 12:32:13 +00:00
garbled
d1407362ba
More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
...
so we shouldn't override it with versions in the manpages. Many more to
come.
1999-03-22 18:43:46 +00:00
lukem
f6a3acc90d
in -x, print MB/s two 2 decimal places. noted by enami@netbsd.org
1998-08-27 03:17:49 +00:00
enami
cb5c756e90
add -x in usage.
1998-08-27 01:59:38 +00:00
lukem
26afa02db6
* implement -x; extended disk statistics. option inspired by solaris' iostat.
...
* fix a few typos
* a bit of KNF and egcs cleanup
* add a HISTORY (hopefully correct)
1998-08-25 08:05:47 +00:00
drochner
017037d6b1
adapt to changed dkinit() in ../../usr.bin/vmstat/dkstats.c
1998-07-19 17:48:15 +00:00
mrg
c2b498a921
KNF.
1998-07-05 06:20:05 +00:00