Commit Graph

51 Commits

Author SHA1 Message Date
David E. O'Brien
052238b16c style.Makefile(5) 2003-04-04 17:49:21 +00:00
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
Poul-Henning Kamp
190ff54ebb Add #include <sys/resource.h>
My apologies for missing these #includes, I must have confused the
dependencies with a wrong timestamp or something.
2003-02-16 16:01:52 +00:00
Poul-Henning Kamp
f341ca9891 Remove #include <sys/dkstat.h> 2003-02-16 14:13:23 +00:00
Jens Schweikhardt
57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
Tom Rhodes
26b848c3d7 MFS: Spelling: s/transfered/transferred/
PR:		46104
Pointed out by:	Rich Morin <rdm@cfcl.com>
Approved by:	re (rwatson)
2002-12-12 15:38:07 +00:00
Bruce Evans
8fa6b8a8b6 Use essentially the same formatting of the CPU stats percentages as in
vmstat so that they never coalesce.  Both iostat and vmstat need larger
fixes to prevent wide fields from unnecessarily messing up the alignment
of all subsequent fields.

PR:		41674
MFC-after:	3 days
2002-08-18 17:51:14 +00:00
Bruce Evans
2757068e4f Include <nlist.h> for nlist interfaces instead of depending on namespace
pollution in <kvm.h>.
2002-08-18 17:35:55 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Josef Karthauser
1063e12617 Replace /kernel with /boot/kernel/kernel.
PR:		docs/37757
Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-05-09 11:47:42 +00:00
Guido van Rooij
775b007440 Redo patch in 1.22 such that the header printing is reset when the
process gets a SIGCONT

Reviewed by:	kris@freebs.org
MFC after:	2 weeks
2001-09-26 19:35:03 +00:00
Kris Kennaway
e65cded7f3 Don't do unsafe activities in the syscall handler.
MFC after:	2 weeks
2001-09-01 07:40:19 +00:00
Kenneth D. Merry
5dc445bf4a Bring in some iostat fixes that bde reminded me about. These fixes were
originally written in January, 2000, but have been substantially updated.

- No longer use hz/stathz and the CPU times in computing the TTY stats,
  but rather use etime, like the disk stats.
- Clean up malloc/realloc failure tests.
- Use a new integrated routine to fetch devstat information via sysctl or
  KVM.
- Get rid of the X() macro for calculating CPU stats
- Use rint() on the CPU state display to avoid truncation errors.  (this
  requires libm)
- Clean up flag usage somewhat.

Reviewed by:	bde
2001-08-23 03:19:54 +00:00
Ruslan Ermilov
eb9fc72525 mdoc(7) police: markup nits. 2001-08-07 13:59:48 +00:00
Thomas Moestl
5fc5ae5cdd Make use of the new features of libdevstat to allow iostat to work on
crash dumps, and make it use sysctl for all data retrievals in the
"live" case (i.e. when not using iostat on a crash dump).
Remove setgid kmem for the iostat executable, it is not needed any
more after these changes.

Reviewed by:	ken
2001-08-04 18:30:54 +00:00
David E. O'Brien
90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Ruslan Ermilov
a4c37c816b mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 15:12:08 +00:00
Dima Dorfman
70d51341bf mdoc(7) police: remove extraneous .Pp before and/or after .Sh. 2001-07-09 09:54:33 +00:00
Ruslan Ermilov
3ab9a9d0e0 Removed -I${.CURDIR}/.../sys from CFLAGS. 2001-05-18 13:41:42 +00:00
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov
c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Ruslan Ermilov
610a5778c5 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:44:04 +00:00
Ruslan Ermilov
8b5c4af3ff Prepare for mdoc(7)NG. 2000-12-27 15:30:30 +00:00
Ruslan Ermilov
ed40311694 mdoc(7) police: removed history info from the .Os FreeBSD call. 2000-12-14 11:52:05 +00:00
Chris D. Faulhaber
b673f44d6d Properly check malloc(3) return values
Approved by:	ken
2000-12-01 12:02:16 +00:00
Ruslan Ermilov
e97407b4f2 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
Jeroen Ruigrok van der Werven
eff280b358 Remove bogus include, as per style(9).
Remove unused variable.
2000-04-30 17:05:26 +00:00
Philippe Charnier
8743d3dc99 Back out previous commit minus spelling fixes. Should have asked maintainer
before.
2000-01-24 22:08:19 +00:00
Philippe Charnier
5d4a8fa90e Rework use of Nm.
Remove -? flag that was not working but documented. Make it work instead
but hide it in man page and usage string as others tools do.
Spelling.
Abort on allocation failure (with errx()).
2000-01-23 20:19:34 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Mike Pritchard
32fdc70513 Various man page cleanup:
- Sort xrefs.
- FreeBSD.ORG -> FreeBSD.org
- Be consistent with section names as outlined in mdoc(7).
- Other misc mdoc cleanup.

PR:		doc/13144
Submitted by:	Alexey M. Zelkin <phantom@cris.net>
1999-08-15 08:47:11 +00:00
Warner Losh
01f6620685 Per Ken's request, back out my last change to this file. iostat's man
page documents '?' as a valid option, as does the usage message.  None
of the other programs' man pages documented '?' as a valid option.
1999-06-24 07:39:25 +00:00
Warner Losh
35994ac2c0 Two getopts related nits:
o getopt returns -1 rather than EOF on errors
	o getopt returns '?' for characters it doesn't know about, so
	  don't include them in the getopt options string.
1999-06-24 06:43:21 +00:00
Kenneth D. Merry
7c903b3d7e Add a MAINTAINER line to modules that I maintain.
Suggested by:	brian, markm
1999-06-18 00:41:47 +00:00
Kenneth D. Merry
bcc6a3da92 Change the devstat generation number from an int to a long. The int-sized
generation was causing unaligned access faults on the Alpha.

I have incremented the devstat version number, since this is an interface
change.  You'll need to recompile libdevstat, systat, iostat, vmstat and
rpc.rstatd along with your kernel.

Partially Submitted by:	Andrew Gallatin <gallatin@cs.duke.edu>
1998-09-20 00:11:23 +00:00
Kenneth D. Merry
e4d7fe0209 Fix style bugs introduced by Matt Dillon in his previous, unreviewed
commit.

Reviewed by:	gibbs
1998-09-16 23:14:47 +00:00
Matthew Dillon
2fa4aaa07a Fixed segfault when more then four devices are specified (improper free),
fixed variable so all manually-specified devices are shown rather then
    cutting the display off at 3, fixed formatting for msps when msps is
    larger then 100 (it was blowing the columner display output before),
    added -K option to make blk count (-oIK) force a 1K block size (to conform
    more closely to systat, vmstat definition of blocksize).
1998-09-16 18:03:44 +00:00
Justin T. Gibbs
8d2fbde504 Update system to new device statistics code.
Submitted by:	"Kenneth D. Merry" <ken@plutotech.com>
1998-09-15 08:16:45 +00:00
Philippe Charnier
c1a2e93e94 Use err(3). 1997-09-19 06:27:30 +00:00
Guido van Rooij
dc7cf2d101 Remove -I/sys and add -I${.CURDIR}/../../sys 1997-07-13 11:51:28 +00:00
Warner Losh
6c3f552a31 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-31 05:11:47 +00:00
Poul-Henning Kamp
d469fb7bda when you try to run iostat is fails with invalid dk_ndrive 0
Reviewed by:	 phk
Submitted by:	John-Mark Gurney <jmg@nike.efn.org>
1996-11-06 19:43:10 +00:00
Jordan K. Hubbard
94591e176e Cosmetic fixes for drive names which are 4 chars long.
Submitted-By: Joe Greco <jgreco@ns.sol.net>
1996-06-11 16:18:58 +00:00
Mike Pritchard
270d3d754a Fix a variety of minor typos and cross references in a bunch of
man pages.

Masanobu Saitoh <msaitoh@spa.is.uec.ac.jp>
Giles Lean <giles@nemeton.com.au>
<soda@sra.co.jp>
1996-01-20 07:29:11 +00:00
Rodney W. Grimes
709e8f9ae1 Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
Andrey A. Chernov
936d754a6c Fix printout bug
Submitted by: fredriks@mcs.com
1994-11-10 13:39:01 +00:00
Garrett Wollman
379bb2d779 New way of getting disk drive names. 1994-10-16 04:04:56 +00:00
Garrett Wollman
84e59eb50d Get rid of update. Make man page installation work with our scheme
(and rename a few in the process).
1994-08-05 16:31:05 +00:00
David Greenman
b3bfc7199e Converted 'vmunix' to 'kernel'. 1994-08-05 09:14:37 +00:00