Commit Graph

58 Commits

Author SHA1 Message Date
ru
4a6cd75809 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
kan
d439709132 Remove the use of cast as lvalue. GCC 3.4 isses a deprecation warning
for this now.
2004-06-25 01:16:02 +00:00
ru
4c72afa60b Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
bde
32020aab54 Include <nlist.h> for nlist-related declarations instead of depending on
namespace pollution in <kvm.h>.
2003-10-13 05:30:20 +00:00
ru
b8e742a388 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
obrien
bf7b07bcb2 style.Makefile(5) 2003-08-18 15:25:39 +00:00
phk
a82593e559 It is not an error to have no devices. 2003-08-17 12:06:44 +00:00
gordon
4b82045616 Stage 3 of dynamic root support. Make all the libraries needed to run
binaries in /bin and /sbin installed in /lib. Only the versioned files
reside in /lib, the .so symlink continues to live /usr/lib so the
toolchain doesn't need to be modified.
2003-08-17 08:28:46 +00:00
ken
18c4fc47dc Remove MAINTAINER= lines in the makefiles for camcontrol, iostat, libcam
and libdevstat, since the new way of doing things is to just list
maintainership in src/MAINTAINERS.

Also, remove duplicate entries in src/MAINTAINERS for those utilities.  I
already had entries for them.
2003-06-14 05:28:01 +00:00
ru
182d112c40 Assorted mdoc(7) fixes.
Approved by:	re (blanket)
2003-05-22 13:02:28 +00:00
phk
b2a42d1c6c Add prototype for compute_stats() so that libdevstat is WARNS=4 clean.
Spotted by:	kris
2003-04-19 07:42:13 +00:00
phk
4f9e8b553b If rounding results in -epsilon device busy %, set it to zero. 2003-04-09 07:49:15 +00:00
phk
d515862cdc typo 2003-03-19 14:15:32 +00:00
phk
4011bd8ccc Further unbreak devstat: sort the index array in correct order too. 2003-03-19 14:11:14 +00:00
phk
f80c64c40b ARGH!
Pointy hat to:	phk
2003-03-18 17:05:27 +00:00
phk
93d5bd09e1 Commit ken@' changes to this file: Bump version and append new entries
to stay backwards compatible.
2003-03-18 16:44:10 +00:00
phk
df72e1a006 Update to match reality closer. 2003-03-18 13:45:08 +00:00
phk
d1ce57cd83 Add more devstat calculations, mostly filling in holes, but also adding
a couple of reqests:  DSM_BUSY_PCT and DSM_QUEUE_LENGTH.

I have no further plans for mutilating this API at this point in
time, and will update the man-page to reflect current reality as
the next thing.

Reviewed by:    ken
2003-03-18 09:57:54 +00:00
phk
013cf440ee And I managed to make a regression here too.
I have too many source trees :-(
2003-03-15 22:22:11 +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
3bedbf9d27 Don't tell people to include <sys/dkstat.h> any more.
Pointed out by:	kuriyama
2003-02-19 06:33:37 +00:00
phk
2d301acee4 Remove include of <sys/dkstat.h> 2003-02-16 14:08:52 +00:00
phk
d98c48fe4f Premptively include <sys/resource.h> to get the cp_time[CPUSTATES]. 2003-02-16 13:29:28 +00:00
peter
8d8b96d08c Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00
obrien
24a8f39238 Remove 'register' keyword. 2002-03-21 23:39:28 +00:00
bde
3c074cac44 Fixed wrong arg type in synopsis. 2001-10-03 03:57:42 +00:00
ru
727c2b4b9e mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
ken
9f9207e121 Turn on WARNS?= 2 for libdevstat.
Submitted by:	"Sergey A. Osokin" <osa@freebsd.org.ru>
2001-09-23 23:03:23 +00:00
dillon
d375fe96be Implement __FBSDID() 2001-09-16 21:35:07 +00:00
ken
f3757912bf Remove a duplicate "that".
Submitted by:	"Sergey A. Osokin" <osa@freebsd.org.ru>
2001-08-24 02:24:58 +00:00
ru
f5c34b17b4 mdoc(7) police: Fixed broken xrefs. 2001-08-22 14:16:31 +00:00
ken
6d1c79ab1c Fix some style inconsistencies introduced in rev 1.10, as well as some
other inconsistencies that I missed in my review of rev 1.7.  Also fix
a cut-n-paste error from an earlier revision.
2001-08-21 05:23:37 +00:00
brian
d7dc171062 Better snprintf() handling.
Prompted by: bde
2001-08-20 15:43:14 +00:00
brian
328c1acb51 Handle snprintf() returning -1.
MFC after:	2 weeks
2001-08-20 12:50:21 +00:00
ken
c0187522a6 Implement compute_stats() in terms of devstat_compute_statistics(). This
gets rid of the duplicated code in compute_stats().

Add a new DSM_SKIP statistic type for devstat_compute_statistics() that
causes the subsequent variable argument to be skipped.

Thanks to Sergey Osokin for coding up my idea/code fragment.

Submitted by:	"Sergey A. Osokin" <osa@freebsd.org.ru>
2001-08-18 05:46:59 +00:00
tmm
55da0aef4c Add some features to libdevstat, and overhaul the interface a bit:
1.) prefix all functions in the library with devstat_ (compatability
    functions are available for all functions that were chaned in an
    incompatible way, but are deprecated).
2.) Add a pointer to a kvm_t as the first argument to functions that
    used to get their information via sysctl; they behave the same
    as before when NULL is passed as this argument, otherwise, the
    information is obtained via libkvm using the supplied handle.
3.) Add a new function, devstat_compute_statistics(), that is intended
    to replace the old compute_stats() function. It offers more
    statistics data, and has a more flexible interface.

libdevstat does now require libkvm; a library depedency is added, so
that libkvm only needs to be explicitely specified for statically linked
programs.
The library major version number is bumped.

Submitted by:	Sergey A. Osokin <osa@freebsd.org.ru>, ken (3)
Reviewed by:	ken
2001-08-04 18:25:48 +00:00
dd
c49a4e6620 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
ru
940dc0c680 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 13:41:46 +00:00
ru
136b4e514b Removed -I${.CURDIR}/.../sys from CFLAGS. 2001-05-18 13:41:42 +00:00
ru
f85a17a1d7 MAN[1-9] -> MAN. 2001-03-27 17:27:19 +00:00
ru
b1c3961564 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
ru
fb54000812 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
ru
fe2efd38b3 mdoc(7) police: removed history info from the .Os FreeBSD call. 2000-12-14 11:52:05 +00:00
ru
920dfa0863 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 14:08:07 +00:00
phantom
b3638214b8 Introduce .Lb macro to libdevstat library manpage 2000-04-22 15:58:01 +00:00
rgrimes
7e1486bf06 Replace beforeinstall target with new variables used by .mk system.
Reviewed by:	marcel, and make world
2000-01-14 07:57:47 +00:00
ken
c633b9a900 Clarify what getdevs() expects as input.
Prompted by:	grog
1999-09-23 06:36:02 +00:00
phantom
3ab98d3c59 Synchronization of NAME and SINOPSYS sections.
mdoc(7)'fy
1999-09-21 19:22:30 +00:00
peter
e226894fa0 $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
ken
0f6688579d Add a MAINTAINER line to modules that I maintain.
Suggested by:	brian, markm
1999-06-18 00:41:47 +00:00