Commit Graph

33 Commits

Author SHA1 Message Date
ru
c96d02bc13 Put libdevstat before libkvm, because the former depends on the latter. 2004-02-04 10:20:43 +00:00
obrien
fb36949058 Add the variable's type to the declaration. 2003-06-02 02:34:36 +00:00
phk
cce6017a6a 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
phk
131780b163 Update to current devstat API. 2003-03-15 21:04:50 +00:00
phk
c8dde305a0 Add #include <sys/resource.h> 2003-02-16 15:21:26 +00:00
phk
ae785a0d33 Remove <sys/dkstat.h> #include 2003-02-16 14:09:16 +00:00
mike
147d486609 Rename local function havedisk() to haveadisk() to avoid conflict a
with another function by the same name in a system header.
2002-10-02 18:29:50 +00:00
bde
a1b0d4b756 Include <nlist.h> for nlist interfaces instead of depending on namespace
pollution in <kvm.h>.
2002-08-18 17:57:08 +00:00
alfred
cea7fda8ee Port to TI/RPC and/or IPV6.
Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
2002-07-15 18:51:57 +00:00
charnier
bb97d03ce3 The .Nm utility 2002-07-06 19:19:48 +00:00
des
c4c5be0b1f Spell void * as void * rather than caddr_t. This is complicated by the
fact that caddr_t is often misspelled as char *.

Sponsored by:	DARPA, NAI Labs
2002-04-28 15:18:50 +00:00
imp
31b11a4a30 o __P removal
o use new style prototypes and function definitions
o signal handlers need an argument.  Mark it unused.
2002-02-07 05:24:53 +00:00
fenner
8f2d29ea2a The interface index space may be sparsely populated (e.g. when an
interface in the middle is if_detach()'d).  Return (and handle)
 ENOENT when the ifmib(4) is accessed for a nonexistent interface.

MFC after: 14 days
2001-10-17 04:12:29 +00:00
jon
bc77987190 Fixes file descriptor leak in standalone mode.
Prevents simultaneous calls to updatestat() as function is not reentrant.

PR:		bin/24857
Submitted by:	Martin Butkus <mb@bagheera.thgwf.de>
MFC after:	1 month
2001-08-03 00:23:37 +00:00
dd
c49a4e6620 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
ru
4bbf421d15 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 10:49:54 +00:00
ru
1ef340bf02 - Backout botched attempt to intoduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:22:12 +00:00
ru
0b5a623dc6 Set the default manual section for libexec/ to 8. 2001-03-20 18:10:13 +00:00
peter
e226894fa0 $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
ken
614c235f78 Fix a memory leak in rpc.rstatd that shows up when it's run in standalone
mode.  (i.e., not from inetd)

PR:		bin/8212
1998-10-08 19:59:40 +00:00
dfr
2ace007d74 Work around an alpha compiler bug.
Reviewed by: Kenneth D. Merry <ken@plutotech.com>
1998-09-16 21:33:14 +00:00
gibbs
1b53fcd958 Update system to new device statistics code.
Submitted by:	"Kenneth D. Merry" <ken@plutotech.com>
		mike@smith.net.au (Mike Smith)
1998-09-15 08:15:30 +00:00
wpaul
7026fff7f5 Make these programs compile and work correctly now that /usr/include/rpcsvc
has been ANSI-fied.

Pointed out by: bde
1998-01-19 23:13:38 +00:00
charnier
4b24ff256f Remove unused #include. Display if inetd started us in case of failure. 1998-01-07 07:51:00 +00:00
charnier
b5211f460a Remove \n at end of syslog string. -Wall cleaning. Cosmetics in man page. 1997-11-26 07:34:56 +00:00
peter
bd20ff9351 Revert $FreeBSD$ to $Id$ 1997-02-22 14:22:49 +00:00
jkh
9c0cd3f9df Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
wollman
38d624cc24 Update to match changes in <net/if.h>. 1997-01-03 20:19:50 +00:00
wollman
af67a835ee Convert this program to use sysctl rather than kvm for some of its
statistics.  Unfortunately, the coverage of sysctl isn't good enough to do
all of them :-( .
1996-12-11 19:11:52 +00:00
rgrimes
1c444a9f7e Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
ats
f10d5a6ab5 Reviewed by: Roger Holst roger@first.gmd.de
Add an initialization of the len parameter for the getsockname call.
Now rpc.rstatd can run under inetd.
1994-11-18 22:31:05 +00:00
dg
d57e34dc4c Updated to changes in struct vmmeter. There is a slight bogosity here:
"pageins/outs" now refers to vnode paging.
1994-10-15 13:39:54 +00:00
csgr
31c1d9b089 rstatd -- from FreeBSD-1.1.5.1, with changes for 4.4-Lite kvm interface.
Original rstatd by John Brezak
Submitted by:	Geoff.
1994-08-28 14:49:04 +00:00