aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/systat/main.c
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1994-12-03 10:06:40 +0000
committerBruce Evans <bde@FreeBSD.org>1994-12-03 10:06:40 +0000
commit3544ae54e270c4495c08b818277839487a1dbb5a (patch)
treec1a4da58fcfcc50a0591ac0d2bead1ac99c2bbc1 /usr.bin/systat/main.c
parentb39b673d37b7fc2a38605d3780466c8a8830712c (diff)
downloadsrc-3544ae54e270c4495c08b818277839487a1dbb5a.tar.gz
src-3544ae54e270c4495c08b818277839487a1dbb5a.zip
extern.h, iostat.c, main.c, vmstat.c:
Use the correct value of hz (stathz if it is nonzero) for interpretion of dk_time[] and cp_time[] in iostat.c. Avoid multiple conversions of this value in iostat.c and vmstat.c iostat.c: Implement the display of cp_time[CP_INTR]. Fix the display of cp_time[CP_IDLE] (the display was always null because cp_time[CP_INTR] == 0 was displayed instead). systat.1: Document the display of cp_time[CP_INTR]. vmstat.c: Implement the display of cp_time[CP_INTR].
Notes
Notes: svn path=/head/; revision=4930
Diffstat (limited to 'usr.bin/systat/main.c')
-rw-r--r--usr.bin/systat/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c
index c11c5532144b..07975f3568eb 100644
--- a/usr.bin/systat/main.c
+++ b/usr.bin/systat/main.c
@@ -66,6 +66,7 @@ int col;
int naptime = 5;
int verbose = 1; /* to report kvm read errs */
int hz, stathz;
+double hertz;
char c;
char *namp;
char hostname[MAXHOSTNAMELEN];
@@ -143,6 +144,7 @@ main(argc, argv)
gethostname(hostname, sizeof (hostname));
NREAD(X_HZ, &hz, LONG);
NREAD(X_STATHZ, &stathz, LONG);
+ hertz = stathz ? stathz : hz;
(*curcmd->c_init)();
curcmd->c_flags |= CF_INIT;
labels();