Commit graph

14 commits

Author SHA1 Message Date
Thomas Moestl 342e2faa09 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
Robert Watson 8c82fe65a7 o Make systat/iostat.c use sysctl() to retrieve cp_time instead of
kmem.
2000-11-25 03:47:36 +00:00
Poul-Henning Kamp fb7a8c91b8 Duh! get the scaling right. 2000-06-01 08:49:46 +00:00
Poul-Henning Kamp 0e5064d228 Rescale the IOstat bars, modern disks are faster than old disks. 2000-06-01 08:26:13 +00:00
Poul-Henning Kamp 9df46d4a2a Don't include <sys/buf.h> 2000-05-05 15:41:22 +00:00
Peter Wemm 3879bee426 systat is way too comfortable with curses internals... 1999-08-30 08:18:09 +00:00
Peter Wemm c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
David E. O'Brien d22889b821 Quiet many compiler warnings. 1998-10-08 09:56:10 +00:00
Justin T. Gibbs 8d2fbde504 Update system to new device statistics code.
Submitted by:	"Kenneth D. Merry" <ken@plutotech.com>
1998-09-15 08:16:45 +00:00
Bruce Evans 81a4459b5f Fixed type mismatches which were fatal when sizeof(long) > sizeof(int). 1998-07-06 22:08:00 +00:00
Warner Losh 448b84a0e4 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
Jordan K. Hubbard 94591e176e 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
Bruce Evans 3544ae54e2 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
Rodney W. Grimes 9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00