summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat/swap.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-111-4/+0
| | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-131-0/+1
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-111-1/+0
| | | | Tested with: make universe
* ANSIfy and remove register.delphij2008-01-161-8/+7
| | | | Resulting binary verified with strip(1)+md5(1).
* Add missing things: a prototype and a const qualifier.yar2006-12-231-1/+3
| | | | Found by: WARNS=4
* Dynamically resize the Disk column. It was too narrow for modernyar2006-12-231-21/+46
| | | | | | | | | disk device names such as da0s1b. So we also get rid of the nasty constant 5 scattered over the code. Implementing this change is a good chance to improve other bits around it: init saved lengths early, always check return value from kvm_getswapinfo().
* Clear to EOL after the end of meter so that its reading can decrease.yar2006-12-231-0/+1
|
* Make it possible for meter to reach 100% mark when swap is totally full.yar2006-12-231-1/+1
|
* Improve style:yar2006-12-231-20/+6
| | | | | | | - Don't define vars inside loops. - Avoid useless casts. - Use C idioms. - Do alike things in a consistent way.
* Reposition the "(swap not configured)" sign WRT the new layout.yar2006-12-231-1/+1
|
* Eliminate a couple of screen coordinate variablesyar2006-12-231-14/+8
| | | | that were useless and just obfuscated the code.
* Add some vertical whitespace for easier reading.yar2006-12-231-1/+4
|
* Fix the swap display further:yar2006-12-231-8/+24
| | | | | | | | 1) Resize the Used column to avoid screen overflow if BLOCKSIZE is long. 2) Track the current swap configuration so that its changes don't break the display. Suggested by: bde (1)
* Fix the Total line shown if there are >1 swap devices.yar2006-12-231-11/+9
|
* Start fixing the "swap" display by saving one horizontal position.yar2006-12-231-2/+2
| | | | | Now the display won't overflow the 80-char row if BLOCKSIZE=1024. The new spacing is also consistent with the "pigs" display.
* Consistently mark percentage scales as such.yar2006-11-271-1/+1
| | | | | PR: bin/101975 MFC after: 3 days
* Remove trailing whitespace.bde2006-04-301-4/+4
| | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Back out rev 1.20; getbsize(3)'s original interface has been restored.mike2002-12-301-3/+1
| | | | Approved by: markm
* Adjust for getbsize argument type change.markm2002-10-231-1/+3
|
* Remove unneeded function prototypes.markm2002-10-231-3/+0
|
* remove __Pimp2002-03-221-2/+2
|
* WARNS=2 fixes with NO_WERROR set, as there are some header issuesmarkm2001-12-121-13/+13
| | | | with namelists. use __FBSDID().
* Mark error() as __printflike() and fix a non-exploitable format stringkris2001-05-251-1/+1
| | | | | | error. MFC after: 1 week
* Get rid of setgid kmem for systat, and while being there, fix some bugstmm2001-03-231-4/+1
| | | | | | | | | | | 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
* Quick Fix: swap.c doesn't appear to actually need <sys/conf.h>, so removepeter2000-08-241-1/+0
| | | | | it to try and get world building again. (sys/conf.h now depends on sys/types.h)
* Don't include <sys/buf.h>phk2000-05-051-1/+0
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Tidy up references to <sys/rlist.h> and support for the old swap managementpeter1999-05-111-2/+1
| | | | that went away in January.
* Be nice when no swap is configured in systemdillon1999-02-061-1/+11
|
* Fix labeling bugdillon1999-01-221-1/+3
|
* Make systat -swap use new kvm_swapinfo() functiondillon1999-01-221-137/+57
|
* Quiet many compiler warnings.obrien1998-10-081-3/+6
|
* o Use snprintf rather than sprintfimp1998-06-091-5/+10
| | | | | | | | | | | 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
* Merge from Lite2 (print "??" instead NULL if devname() fails). Morebde1997-07-061-5/+9
| | | | faithful stealing from pstat would have given this already.
* Fix the following old problem:joerg1997-01-121-79/+79
| | | | | | | date: 1994/10/09 07:37:18; author: davidg; state: Exp; lines: +7 -1 #if 0'd out the meat of the swap code until I get a chance to rewrite it. ...mainly by stealing the code from pstat(8).
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
|
* #if 0'd out the meat of the swap code until I get a chance to rewrite it.dg1994-10-091-1/+7
|
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+257
OpenPOWER on IntegriCloud