summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat/main.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove trailing whitespace.bde2006-04-301-3/+3
| | | | | Submitted by: Se=E1n Farley <sean-freebsd at farley dot org> PR: bin/81874
* Show the load average in the tcp display (it was already shown, perhapsbde2006-04-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not very usefully, in all other displays). This was the original point of the PR. Move the load average up by 2 so that it starts in row 0 for all windows (2 lines above it were wasted for all other windows except vmstat). Move everything below it up by 2 or 3 (3 for icmp and icmp6 which had an extra blank line due from not compensating for the foot-shooting in note (3); only ip and ip6 compensated). Reduce the magic numbers related to this. Notes by the submitter: %%% 1. All the subwin() calls are identical using #define MAINWIN_ROW 3 (systat.h). 2. The load average is at the top of the window. 3. Each display starts on the fourth line. I made changes to those displays that shifted the start line (i.e., icmp). This entailed a lot of changes within the comments at the top of those displays. 4. For ip6, I shifted the "Input next-header histogram" column down one row to separate it from "IPv6 Output". I raised "bad scope packets" and "address selection failed" up one row to stay with "IPv6 Input" (valid?). They were down one row to probably line up at the bottom, but I think they should stick with their fellow items in a column. 5. I condensed ifstat a bit. It had a lot of empty rows. %%% Submitted by: Se=E1n Farley <sean-freebsd at farley dot org> PR: bin/81874
* Fix the easy warnings:dwmalone2004-03-091-3/+1
| | | | | | | | | 1) Avoid shadowing index. 2) Constness. 3) Missing prototype for ifcmd. 4) Missing include of string.h. 5) Avoid shadowing error function. 6) ANSI definition for main.
* unifdef __STDC__imp2002-03-231-16/+1
|
* WARNS=2 fixes with NO_WERROR set, as there are some header issuesmarkm2001-12-121-20/+20
| | | | with namelists. use __FBSDID().
* Fix the error buffer passed to kvm_openfiles to have a length oftmm2001-05-251-2/+4
| | | | | | | _POSIX2_LINE_MAX as required. While being there, wrap an overly long line. MFC after: 3 days
* Get rid of setgid kmem for systat, and while being there, fix some bugstmm2001-03-231-3/+25
| | | | | | | | | | | 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
* o Fix up includes which built due to excessive nested including in therwatson2000-12-171-6/+5
| | | | | | | | | base system, but not in BruceBSD. o Fix up style violations of various sorts. o Remove redundant normalization of hertz variable, as the sysctl handler does this work (unlike when kread was used). Submitted by: bde
* o Make systat use sysctl() to retrieve hz and stathz, instead ofrwatson2000-11-251-19/+14
| | | | using kmem.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Quiet many compiler warnings.obrien1998-10-081-1/+5
|
* Fixed type mismatches which were fatal when sizeof(long) > sizeof(int).bde1998-07-061-3/+3
|
* o Use snprintf rather than sprintfimp1998-06-091-2/+2
| | | | | | | | | | | 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
* Main() returns int.charnier1997-08-261-2/+2
|
* Use err(3). /sys/dkstat.h -> /usr/include/sys/dkstat.hcharnier1997-08-131-16/+13
|
* Localize timeache1996-03-311-0/+3
|
* Don't use curses until initialized.phk1995-03-121-8/+8
|
* extern.h, iostat.c, main.c, vmstat.c:bde1994-12-031-0/+2
| | | | | | | | | | | | | | | | | 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].
* Prevents segm. fault on unknown optionache1994-10-191-0/+5
|
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+286
OpenPOWER on IntegriCloud