aboutsummaryrefslogtreecommitdiff
path: root/libexec/rpc.rstatd
Commit message (Collapse)AuthorAgeFilesLines
* Use sysctl to fetch stats from the kernel instead of reading variablesJohn Baldwin2008-06-102-48/+19
| | | | | | | | | | | directly via libkvm. PR: kern/122875, bin/123014 Tested by: Danny Braniss danny cs.huji.ac.il MFC after: 1 week Notes: svn path=/head/; revision=179710
* Fix most cases where the address of an int is passed to a function expecting aStefan Farfeleder2005-02-141-1/+1
| | | | | | | socklen_t * argument. Notes: svn path=/head/; revision=141918
* Put libdevstat before libkvm, because the former depends on the latter.Ruslan Ermilov2004-02-041-2/+2
| | | | Notes: svn path=/head/; revision=125431
* Add the variable's type to the declaration.David E. O'Brien2003-06-021-1/+1
| | | | Notes: svn path=/head/; revision=115667
* Run a revision of the devstat interface:Poul-Henning Kamp2003-03-151-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=112288
* Update to current devstat API.Poul-Henning Kamp2003-03-151-6/+6
| | | | Notes: svn path=/head/; revision=112283
* Add #include <sys/resource.h>Poul-Henning Kamp2003-02-161-0/+1
| | | | Notes: svn path=/head/; revision=111005
* Remove <sys/dkstat.h> #includePoul-Henning Kamp2003-02-161-1/+0
| | | | Notes: svn path=/head/; revision=111001
* Rename local function havedisk() to haveadisk() to avoid conflict aMike Barcroft2002-10-021-3/+3
| | | | | | | with another function by the same name in a system header. Notes: svn path=/head/; revision=104384
* Include <nlist.h> for nlist interfaces instead of depending on namespaceBruce Evans2002-08-181-0/+1
| | | | | | | pollution in <kvm.h>. Notes: svn path=/head/; revision=102069
* Port to TI/RPC and/or IPV6.Alfred Perlstein2002-07-151-26/+40
| | | | | | | Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr> Notes: svn path=/head/; revision=100120
* The .Nm utilityPhilippe Charnier2002-07-061-3/+6
| | | | Notes: svn path=/head/; revision=99500
* Spell void * as void * rather than caddr_t. This is complicated by theDag-Erling Smørgrav2002-04-281-4/+5
| | | | | | | | | fact that caddr_t is often misspelled as char *. Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=95658
* o __P removalWarner Losh2002-02-072-35/+18
| | | | | | | | o use new style prototypes and function definitions o signal handlers need an argument. Mark it unused. Notes: svn path=/head/; revision=90336
* The interface index space may be sparsely populated (e.g. when anBill Fenner2001-10-171-0/+4
| | | | | | | | | | 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 Notes: svn path=/head/; revision=85040
* Fixes file descriptor leak in standalone mode.Jonathan Chen2001-08-031-0/+2
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=81080
* Remove whitespace at EOL.Dima Dorfman2001-07-151-3/+3
| | | | Notes: svn path=/head/; revision=79754
* mdoc(7) police: removed HISTORY info from the .Os call.Ruslan Ermilov2001-07-101-1/+1
| | | | Notes: svn path=/head/; revision=79529
* - Backout botched attempt to intoduce MANSECT feature.Ruslan Ermilov2001-03-261-0/+1
| | | | | | | - MAN[1-9] -> MAN. Notes: svn path=/head/; revision=74814
* Set the default manual section for libexec/ to 8.Ruslan Ermilov2001-03-201-1/+0
| | | | Notes: svn path=/head/; revision=74529
* $Id$ -> $FreeBSD$Peter Wemm1999-08-284-4/+4
| | | | Notes: svn path=/head/; revision=50476
* Fix a memory leak in rpc.rstatd that shows up when it's run in standaloneKenneth D. Merry1998-10-081-1/+7
| | | | | | | | | mode. (i.e., not from inetd) PR: bin/8212 Notes: svn path=/head/; revision=40078
* Work around an alpha compiler bug.Doug Rabson1998-09-161-4/+5
| | | | | | | Reviewed by: Kenneth D. Merry <ken@plutotech.com> Notes: svn path=/head/; revision=39383
* Update system to new device statistics code.Justin T. Gibbs1998-09-152-23/+97
| | | | | | | | Submitted by: "Kenneth D. Merry" <ken@plutotech.com> mike@smith.net.au (Mike Smith) Notes: svn path=/head/; revision=39228
* Make these programs compile and work correctly now that /usr/include/rpcsvcBill Paul1998-01-191-17/+29
| | | | | | | | | has been ANSI-fied. Pointed out by: bde Notes: svn path=/head/; revision=32629
* Remove unused #include. Display if inetd started us in case of failure.Philippe Charnier1998-01-072-10/+5
| | | | Notes: svn path=/head/; revision=32311
* Remove \n at end of syslog string. -Wall cleaning. Cosmetics in man page.Philippe Charnier1997-11-263-28/+39
| | | | Notes: svn path=/head/; revision=31421
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-224-4/+4
| | | | Notes: svn path=/head/; revision=22989
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-144-4/+4
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* Update to match changes in <net/if.h>.Garrett Wollman1997-01-031-2/+1
| | | | Notes: svn path=/head/; revision=21264
* Convert this program to use sysctl rather than kvm for some of itsGarrett Wollman1996-12-111-111/+69
| | | | | | | | statistics. Unfortunately, the coverage of sysctl isn't good enough to do all of them :-( . Notes: svn path=/head/; revision=20333
* Remove trailing whitespace.Rodney W. Grimes1995-05-302-5/+5
| | | | Notes: svn path=/head/; revision=8870
* Reviewed by: Roger Holst roger@first.gmd.deAndreas Schulz1994-11-181-1/+2
| | | | | | | | Add an initialization of the len parameter for the getsockname call. Now rpc.rstatd can run under inetd. Notes: svn path=/head/; revision=4656
* Updated to changes in struct vmmeter. There is a slight bogosity here:David Greenman1994-10-151-5/+5
| | | | | | | "pageins/outs" now refers to vnode paging. Notes: svn path=/head/; revision=3615
* rstatd -- from FreeBSD-1.1.5.1, with changes for 4.4-Lite kvm interface.Geoff Rehmet1994-08-284-0/+647
Original rstatd by John Brezak Submitted by: Geoff. Notes: svn path=/cvs2svn/branches/FBSD_1/; revision=2334