Commit Graph

48 Commits

Author SHA1 Message Date
ken
7013f3a011 Convert systat(1) to use the new devstat interface.
Submitted by:	"Sergey A. Osokin" <osa@freebsd.org.ru>
2001-09-06 04:06:12 +00:00
tmm
cd9612fee6 Replace a use of the hw.nintr sysctl as it has just gone away, cast
size_t variables when passing them to a printf-like function, and some
minor cleanups.
2001-06-01 13:29:19 +00:00
gallatin
9fb8aa97de numdirtybuffers is an int, not a long. 2001-03-29 02:18:19 +00:00
tmm
84e46a81a0 Get rid of setgid kmem for systat, and while being there, fix some bugs
and compiler warnings.
The data for network statistics are still obtained via the kvm interface
if systat was started with the needed privileges, otherwise sysctls are
used. The reason for this is that with really many open sockets, the
sysctl method is probably slower, but it systat -netstat is probably not
really usable in either mode under these conditions.

Approved by:	rwatson
2001-03-23 03:58:25 +00:00
ache
428e7d28a8 Don't attempt to parse %c 2001-03-21 20:32:20 +00:00
gallatin
b5b1c5a2ac Correct int/long type mismatch in the proper place this time. freevnodes
and numvnodes are longs in the kernel.  They should remain longs in systat,
what really needs to change is that they should be using SYSCTL_LONG rather
than SYSCTL_INT.   I also changed wantfreevnodes to SYSCTL_LONG because I
happened to notice it.

I wish there was a way to find all of these automatically..

Pointed out by: bde
2000-12-02 20:08:33 +00:00
gallatin
5d22127768 fix int/long type mismatches found on alpha 2000-12-01 20:01:38 +00:00
rwatson
d19c442921 o Make systat/vmstat.c use sysctl() to retrieve cp_time, bufspace,
maxvnodes, numvnodes, freevnodes, nchstats, and numdirtybuffers.
o Make the hw.ncpu error checking code a little more rigorous by
  sanity checking the returned data size.
o Didn't fix machine-dependent non-sysctl-exported variables:
  intrnames, eintrnames, intrcnt, eintrcnt, as these variables are
  defined and exported from machine-dependent kernel code in
  assembly.  This should probably be fixed somehow.
2000-11-25 03:53:42 +00:00
phk
e28e1daa49 Don't include <sys/buf.h> 2000-05-05 15:41:22 +00:00
imp
8e96f07683 #include <errno.h> where needed. Kill extern int errno;.
Minor warnings in tip corrected.
2000-04-14 06:39:19 +00:00
green
a4afb81b71 "Disks" is more correct than "Disks" could be. 1999-09-19 18:04:54 +00:00
peter
e4b04a2b21 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
des
fa143bce26 Show dirty buffers and the percentage of time a disk was busy.
PR:		12858
Submitted by:	Arjan de Vet <Arjan.deVet@adv.iae.nl>
1999-07-30 07:44:25 +00:00
bde
437ab8d6af Display floats with format %*.0f instead of as "*****" if there is
enough space for this but not enough space for the normal %*.*f
format.  Similarly for long doubles.
1999-03-22 03:44:01 +00:00
dillon
0d6e96cf9b Include discrete ozfod as well as ozfod/zfod percentage. 1999-02-08 02:39:45 +00:00
dillon
466b9cc773 If there are 4 or fewer disk devices, we have room to display additional
VM statistics.  zfod is moved and %slo-z ( percentage of zero-fills that
    were slow, i.e. not pre-zero'd ), and number of pages freed per second.
1999-02-08 02:11:52 +00:00
obrien
fadc302836 revert to rev 1.29. (floppy drives will be gotten rid of another way) 1999-01-09 06:03:54 +00:00
obrien
2cf6fffd18 Turn the compile time option into a run-time option.
You can now use the `want_fd' command in the vmstat display.

Suggested by:	grog
1998-12-27 17:59:42 +00:00
obrien
2812551e5e Don't waste precious space on showing the performance of fdX.
(can get old behavior with -DWANT_FD)
1998-12-27 08:15:37 +00:00
obrien
bbda8835a6 Quiet many compiler warnings. 1998-10-08 09:56:10 +00:00
ken
f4825e5b2b Fix a core-dump situation in ":boot" mode in the vmstat display.
Reported by:	bde
1998-10-05 04:04:27 +00:00
gibbs
e8eb724f93 Update system to new device statistics code.
Submitted by:	"Kenneth D. Merry" <ken@plutotech.com>
1998-09-15 08:16:45 +00:00
bde
6f048033dd Fixed type mismatches which were fatal when sizeof(long) > sizeof(int). 1998-07-06 22:08:00 +00:00
imp
56ce0eeea4 o Use snprintf rather than sprintf
o Add more checks for buffer overflows
o Use snprintf rather than strcat/cpy and have better checks for max
  length exceeded.

Most of these changes are not exploitable buffer overruns, but it never
hurts to be safe.

Inspired by and obtained from: OpenBSD
1998-06-09 04:17:29 +00:00
jhay
e7f4e10343 Correctly display the interrupt counts.
Reviewed with optimizations by:	Tor Egge <tegge>
1998-05-27 21:01:37 +00:00
peter
0b1569b754 Show size of vnode pool in vmstat mode. 1997-09-25 01:14:25 +00:00
charnier
a9616b10c4 Use err(3). /sys/dkstat.h -> /usr/include/sys/dkstat.h 1997-08-13 06:45:11 +00:00
jkh
ad502ffd67 Now that systat's working again, bring the vmstat cleanup over from
-stable.
1996-11-12 19:16:46 +00:00
bde
717bd94ea1 Initialize interrupt counters. The boot time values were displayed as ***.
Should be in 2.2.

Pointed out by:	/etc/malloc.conf -> AJ
1996-11-10 08:30:18 +00:00
jkh
cd1eb95710 Cosmetic fixes for drive names which are 4 chars long.
Submitted-By: Joe Greco <jgreco@ns.sol.net>
1996-06-11 16:18:58 +00:00
ache
d2d7d12fee Localize time 1996-03-31 16:39:26 +00:00
bde
00784e734c Renamed Proc-cache to Dir-cache for the same reasons as in vmstat.
Tweaked screen positions to match.
1996-03-29 14:48:25 +00:00
bde
4622368d18 Reduced vm dependencies. Only `struct vmmeter.h' is required.
Unfortunately, the sysctl number for reading this struct is
bogusly placed in <vm/vm_param.h> instead of with the declaration
of the struct.
1995-12-13 15:01:13 +00:00
peter
953530956d Add explicit #include of <sys/vmmeter.h> after the last round of <vm/vm.h>
changes.
1995-12-13 11:34:46 +00:00
bde
48a6a596b9 Don't attempt to read the variable total' from the kernel. total'
isn't used in systat or in the kernel (it was replaced by a sysctl()
call involving VM_METER) and will go away when I clean up bogus
common variables in the kernel.
1995-07-12 20:09:02 +00:00
rgrimes
79e59e9123 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
dg
b9a45017e2 From Mark Murray:
I got irritated with not seeing the interrupt numbers in a (crowded)
"systat -vmstat" display, so I fixed it. Here is a patch to please be
applied in src/usr.bin/systat
1995-03-29 00:10:14 +00:00
dg
063509cde0 Removed object lookup/hit count and changed the order of things a little. 1995-03-25 08:44:48 +00:00
dg
bd4e9b4513 Removed cnt.v_nzfod...we don't support it in the kernel. 1995-03-25 06:39:47 +00:00
phk
23a0b91cfe Fix the Name-cache counters. I didn't realign the negative hits. 1995-03-18 08:55:15 +00:00
phk
4f11b640c4 Report the negative hits in the Namei section. 1995-03-12 01:58:18 +00:00
dg
0039079226 Changes to support printing stats for the 'cached pages'.
Submitted by:	John Dyson
1995-03-10 20:07:21 +00:00
bde
507c04bcc3 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].
1994-12-03 10:06:40 +00:00
dg
fb5bb563e2 Moved "VMSTAT" column up by one row so that it displays properly on 24
row displays.
1994-11-25 03:48:04 +00:00
dg
126ffa95cf Updated to changes in struct vmmeter. 1994-10-18 15:03:10 +00:00
dg
6f8df8debf Updated to changes in struct vmmeter. 1994-10-15 13:37:41 +00:00
wollman
d475bb33fe Make the %zfod display make more sense by comparing zfod versus the total
zfod + nzfod, rather than zfod / nzfod, which doesn't make a whole lot of sense.
1994-08-07 00:16:29 +00:00
rgrimes
f9ab90d9d6 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00