Commit Graph

76 Commits

Author SHA1 Message Date
pluknet
3dc5336e2e Fix a typo. 2013-12-25 19:38:16 +00:00
pluknet
ba8551c440 For vmcore, calculate time relative to device creation upon time_uptime.
Previously it used a clock from live kernel.

MFC after:	2 weeks
2013-12-25 17:11:49 +00:00
trociny
7c744361c2 New devstat metrics for devstat_compute_statistics():
DSM_TOTAL_DURATION
  DSM_TOTAL_DURATION_READ
  DSM_TOTAL_DURATION_WRITE
  DSM_TOTAL_DURATION_FREE
  DSM_TOTAL_DURATION_OTHER
  DSM_TOTAL_BUSY_TIME
2012-12-15 18:19:48 +00:00
ed
23524b572c Globally replace u_int*_t from (non-contributed) man pages.
The reasoning behind this, is that if we are consistent in our
documentation about the uint*_t stuff, people will be less tempted to
write new code that uses the non-standard types.

I am not going to bump the man page dates, as these changes can be
considered style nits. The meaning of the man pages is unaffected.

MFC after:	1 month
2012-02-12 18:29:56 +00:00
ghelmer
04dcea5a10 Handle memory allocation failures in devstat_getdevs(), devstat_selectdevs(),
and devstat_buildmatch().

PR:		bin/83359
Reviewed by:	ken
2012-01-06 21:28:29 +00:00
pluknet
7eb224fc95 Do not increment num_args if strsep(3) returned an empty field.
That fixes devstat_buildmatch(3) crashes with certain strings.

Reported by:	arundel
MFC after:	2 weeks
2011-04-04 09:25:27 +00:00
joel
60754e9168 Spelling fixes. 2010-08-03 17:40:09 +00:00
ed
09818ac28e Build lib/ with WARNS=6 by default.
Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.

I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.
2010-01-02 09:58:07 +00:00
kensmith
9c2c634ee9 Bump the version of all non-symbol-versioned shared libraries in
preparation for 8.0-RELEASE.  Add the previous version of those
libraries to ObsoleteFiles.inc and bump __FreeBSD_Version.

Reviewed by:    kib
Approved by:    re (rwatson)
2009-07-19 17:25:24 +00:00
jhb
d8dba28f83 The devstat(3) manpage claims that only <devstat.h> is needed as a
prerequisite for using this interface.  However, the 'statinfo' struct
actually references CPUSTATES from <sys/resource.h>, so in fact it
requires <sys/resource.h> to compile.  Use a nested include of
<sys/resource.h> to make the code match the docs.

Reported by:	Pietro Cerutti  gahr | gahr.ch
2008-01-31 16:55:12 +00:00
deischen
ff36458e08 Bump library versions in preparation for 7.0.
Ok'd by:	kan
2007-05-21 02:49:08 +00:00
stefanf
ec5bd3df63 Remove an unused variable.
Reviewed by:	ken
2005-10-04 22:00:35 +00:00
ken
8857ccea41 Remove a reference to compute_stats(), since it is no longer documented at
least.

Submitted by:	osa
MFC after:	1 week
2005-08-10 00:51:36 +00:00
kensmith
f97f77429f Bump the shared library version number of all libraries that have not
been bumped since RELENG_5.

Reviewed by:	ru
Approved by:	re (not needed for commit check but in principle...)
2005-07-22 17:19:05 +00:00
charnier
d0ede4c6a3 sync function prototype with reality. 2005-07-17 13:33:04 +00:00
ru
05fa1e3b40 Tidy up the markup.
Approved by:	re (blanket manpages)
2005-06-30 06:35:51 +00:00
mux
a985d1fd69 Use __func__ throughout devstat.c instead of defining a func_name
variable in each function.
2005-04-26 15:02:01 +00:00
mux
f213c67ee0 Make this compile with GCC4 by fixing a signedness issue.
Reviewed by:	md5(1)
2005-04-26 14:51:09 +00:00
ru
01548ace15 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
kan
e8d7daaa93 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
743cc6d002 Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
bde
47ef5b092f 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
1c23ef339b mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
obrien
372364ee0f style.Makefile(5) 2003-08-18 15:25:39 +00:00
phk
afe46bebc0 It is not an error to have no devices. 2003-08-17 12:06:44 +00:00
gordon
5901302929 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
a69cc262ba 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
9bcac8799e Assorted mdoc(7) fixes.
Approved by:	re (blanket)
2003-05-22 13:02:28 +00:00
phk
e4e245e504 Add prototype for compute_stats() so that libdevstat is WARNS=4 clean.
Spotted by:	kris
2003-04-19 07:42:13 +00:00
phk
bd7b2f8fd0 If rounding results in -epsilon device busy %, set it to zero. 2003-04-09 07:49:15 +00:00
phk
5464c702e3 typo 2003-03-19 14:15:32 +00:00
phk
55b12ff691 Further unbreak devstat: sort the index array in correct order too. 2003-03-19 14:11:14 +00:00
phk
45fa1964e9 ARGH!
Pointy hat to:	phk
2003-03-18 17:05:27 +00:00
phk
9fab416cf4 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
100732c867 Update to match reality closer. 2003-03-18 13:45:08 +00:00
phk
f4bf9dc635 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
103651196e And I managed to make a regression here too.
I have too many source trees :-(
2003-03-15 22:22:11 +00:00
phk
f432014308 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
fbcc1c120b Don't tell people to include <sys/dkstat.h> any more.
Pointed out by:	kuriyama
2003-02-19 06:33:37 +00:00
phk
6076eca6f2 Remove include of <sys/dkstat.h> 2003-02-16 14:08:52 +00:00
phk
4f3d0c80f3 Premptively include <sys/resource.h> to get the cp_time[CPUSTATES]. 2003-02-16 13:29:28 +00:00
peter
0a7f0ba37e Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00
obrien
084b4588f2 Remove 'register' keyword. 2002-03-21 23:39:28 +00:00
bde
eadd87b6ca Fixed wrong arg type in synopsis. 2001-10-03 03:57:42 +00:00
ru
623da62a5a mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
ken
51f12c2733 Turn on WARNS?= 2 for libdevstat.
Submitted by:	"Sergey A. Osokin" <osa@freebsd.org.ru>
2001-09-23 23:03:23 +00:00
dillon
41abc6d4e4 Implement __FBSDID() 2001-09-16 21:35:07 +00:00
ken
dcc548344f Remove a duplicate "that".
Submitted by:	"Sergey A. Osokin" <osa@freebsd.org.ru>
2001-08-24 02:24:58 +00:00
ru
2b577fc318 mdoc(7) police: Fixed broken xrefs. 2001-08-22 14:16:31 +00:00
ken
067f3e7b94 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