freebsd-dev/usr.bin/systat
Poul-Henning Kamp 7194d335cf Run a revision of the devstat interface:
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
2003-03-15 21:59:06 +00:00
..
cmds.c When we close a display, mark it as not-initialized so that we will 2003-01-04 21:58:25 +00:00
cmdtab.c Add "ifstat" display: 2003-01-04 22:07:24 +00:00
convtbl.c Add "ifstat" display: 2003-01-04 22:07:24 +00:00
convtbl.h Add "ifstat" display: 2003-01-04 22:07:24 +00:00
devs.c Add #include <sys/resource.h> 2003-02-16 15:46:25 +00:00
devs.h WARNS=2 fixes with NO_WERROR set, as there are some header issues 2001-12-12 00:13:37 +00:00
extern.h Add "ifstat" display: 2003-01-04 22:07:24 +00:00
fetch.c WARNS=2 fixes with NO_WERROR set, as there are some header issues 2001-12-12 00:13:37 +00:00
icmp.c WARNS=2 fixes with NO_WERROR set, as there are some header issues 2001-12-12 00:13:37 +00:00
ifcmds.c Add "ifstat" display: 2003-01-04 22:07:24 +00:00
ifstat.c Add "ifstat" display: 2003-01-04 22:07:24 +00:00
iostat.c Run a revision of the devstat interface: 2003-03-15 21:59:06 +00:00
ip.c WARNS=2 fixes with NO_WERROR set, as there are some header issues 2001-12-12 00:13:37 +00:00
keyboard.c WARNS=2 fixes with NO_WERROR set, as there are some header issues 2001-12-12 00:13:37 +00:00
main.c unifdef __STDC__ 2002-03-23 23:37:07 +00:00
Makefile Add "ifstat" display: 2003-01-04 22:07:24 +00:00
mbufs.c WARNS=2 fixes with NO_WERROR set, as there are some header issues 2001-12-12 00:13:37 +00:00
mode.c WARNS=2 fixes with NO_WERROR set, as there are some header issues 2001-12-12 00:13:37 +00:00
mode.h WARNS=2 fixes with NO_WERROR set, as there are some header issues 2001-12-12 00:13:37 +00:00
netcmds.c remove __P 2002-03-22 01:42:45 +00:00
netstat.c Widen struct sockbuf's sb_timeo member to int from short. With 2002-07-24 03:02:43 +00:00
pigs.c Remove #include <sys/dkstat.h> 2003-02-16 14:13:23 +00:00
swap.c Back out rev 1.20; getbsize(3)'s original interface has been restored. 2002-12-30 18:14:43 +00:00
systat.1 mdoc(7) police: Scheduled sweep. 2003-02-24 22:53:26 +00:00
systat.h WARNS=2 fixes with NO_WERROR set, as there are some header issues 2001-12-12 00:13:37 +00:00
tcp.c WARNS=2 fixes with NO_WERROR set, as there are some header issues 2001-12-12 00:13:37 +00:00
vmstat.c Run a revision of the devstat interface: 2003-03-15 21:59:06 +00:00