summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat/iostat.c
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace fixes.ed2012-02-051-1/+0
| | | | | | - Remove redundant empty lines. - Replace ^L by \014. This allows you to safely cat/grep/etc this file without causing confusion.
* 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-21/+12
| | | | Resulting binary verified with strip(1)+md5(1).
* Consistently mark percentage scales as such.yar2006-11-271-2/+2
| | | | | 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
* Copy cur's snap_time to last when refreshing statistics. Fixes problemtjr2003-11-011-0/+2
| | | | | | | | where MB/s and tps statistics would always be zero, presumably because they were being averaged out over the time between now and when the system booted instead of a few seconds. PR: 58683
* Run a revision of the devstat interface:phk2003-03-151-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kernel: Change statistics to use the *uptime() timescale (ie: relative to boottime) rather than the UTC aligned timescale. This makes the device statistics code oblivious to clock steps. Change timestamps to bintime format, they are cheaper. Remove the "busy_count", and replace it with two counter fields: "start_count" and "end_count", which are updated in the down and up paths respectively. This removes the locking constraint on devstat. Add a timestamp argument to devstat_start_transaction(), this will normally be a timestamp set by the *_bio() function in bp->bio_t0. Use this field to calculate duration of I/O operations. Add two timestamp arguments to devstat_end_transaction(), one is the current time, a NULL pointer means "take timestamp yourself", the other is the timestamp of when this transaction started (see above). Change calculation of busy_time to operate on "the salami principle": Only when we are idle, which we can determine by the start+end counts being identical, do we update the "busy_from" field in the down path. In the up path we accumulate the timeslice in busy_time and update busy_from. Change the byte_* and num_* fields into two arrays: bytes[] and operations[]. Userland: Change the misleading "busy_time" name to be called "snap_time" and make the time long double since that is what most users need anyway, fill it using clock_gettime(CLOCK_MONOTONIC) to put it on the same timescale as the kernel fields. Change devstat_compute_etime() to operate on struct bintime. Remove the version 2 legacy interface: the change to bintime makes compatibility far too expensive. Fix a bug in systat's "vm" page where boot relative busy times would be bogus. Bump __FreeBSD_version to 500107 Review & Collaboration by: ken
* Add #include <sys/resource.h>phk2003-02-161-0/+1
|
* Remove #include <sys/dkstat.h>phk2003-02-161-1/+0
|
* remove __Pimp2002-03-221-5/+5
|
* WARNS=2 fixes with NO_WERROR set, as there are some header issuesmarkm2001-12-121-43/+45
| | | | with namelists. use __FBSDID().
* Convert systat(1) to use the new devstat interface.ken2001-09-061-7/+8
| | | | Submitted by: "Sergey A. Osokin" <osa@freebsd.org.ru>
* Get rid of setgid kmem for systat, and while being there, fix some bugstmm2001-03-231-1/+2
| | | | | | | | | | | 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 Make systat/iostat.c use sysctl() to retrieve cp_time instead ofrwatson2000-11-251-23/+9
| | | | kmem.
* Duh! get the scaling right.phk2000-06-011-3/+3
|
* Rescale the IOstat bars, modern disks are faster than old disks.phk2000-06-011-2/+2
|
* Don't include <sys/buf.h>phk2000-05-051-1/+0
|
* systat is way too comfortable with curses internals...peter1999-08-301-8/+8
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Quiet many compiler warnings.obrien1998-10-081-2/+3
|
* Update system to new device statistics code.gibbs1998-09-151-110/+145
| | | | Submitted by: "Kenneth D. Merry" <ken@plutotech.com>
* Fixed type mismatches which were fatal when sizeof(long) > sizeof(int).bde1998-07-061-1/+1
|
* o Use snprintf rather than sprintfimp1998-06-091-1/+1
| | | | | | | | | | | 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
* Cosmetic fixes for drive names which are 4 chars long.jkh1996-06-111-6/+6
| | | | Submitted-By: Joe Greco <jgreco@ns.sol.net>
* extern.h, iostat.c, main.c, vmstat.c:bde1994-12-031-7/+4
| | | | | | | | | | | | | | | | | 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].
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+389
OpenPOWER on IntegriCloud