Commit Graph

215 Commits

Author SHA1 Message Date
atatat caea20e952 Add PTRTOUINT64() and UINT64TOPTR() macros to sys/sysctl.h for use by
kern.proc, kern.proc2, kern.lwp, and kern.buf.

Define more MIB for kern.buf so that specific buffers can be selected
(only all/all is supported right now), and use a 32/64 bit agnostic
structure for communcating buffer information to userland.

Convert systat to the new kern.buf method.

Clean up the vm.buf* handling a little.  There's no actual need to
record the dynamically assigned OIDs, since sysctl_data can tell us
what we're looking at.

Oh, and fix a typo in a comment.
2004-02-19 03:56:30 +00:00
wiz d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
jdolecek bd4dbe8139 g/c SDEAD handling 2004-01-11 19:15:50 +00:00
pk 498839ae5e Adapt to kernel buffer cache memort allocation changes.
Since the buffer headers do no longer exist as an array in the kernel anymore,
use the new CTL_KERN.KERN_BUF mib to fetch them from kernel space.

Also look at a vnode's specinfo field to properly associate an opened
block device special file with a mounted filesystem.
2003-12-30 12:52:48 +00:00
christos 6a02b7be66 - avoid coredump by returning NULL when read fails and don't keep following
the list.
- avoid zerodivide.
XXX: still does not work, but at least it does not core-dump.
2003-12-07 07:28:05 +00:00
christos 676abde787 be more descriptive about what failed by printing the errno and the
variable we were trying to fetch.
2003-12-07 07:27:09 +00:00
agc b2b49933f4 Move Matt Green's code from a 4-clause to a 3-clause licence by removing
the advertising clause. Diffs provided in PR 22396 by Joel Baker, the changes
were confirmed to the board by Matt Green.
2003-10-13 14:22:20 +00:00
itojun 407df6861c realloc pedant 2003-09-19 07:08:50 +00:00
wiz 99612f8f60 Bump date for previous, reword a sentence. 2003-09-15 13:17:24 +00:00
mycroft 0e1a71bba5 WRT disk commands, make the man page consistent with the program, and add the
feature I expected.
2003-09-12 17:32:29 +00:00
mycroft a84dcb3095 Allow lower case 'q' to quit. 2003-09-12 17:31:26 +00:00
itojun 0162be23d0 synchronize w/ inpcb/in6pcb change 2003-09-04 09:23:35 +00:00
dsl 99135be3ff Use correct size when copying interrupt counters.
Fixes second part of bin/10095 (first part fixed in rev 1.25)
2003-08-30 12:57:03 +00:00
dsl df54a17886 Bring description of vmstat page closer to reality. 2003-08-30 12:27:26 +00:00
dsl 55a20c5130 Correct boundary conditions for drive table for 'systat io num'.
Correct fix for bin/18823 (which was incomplete and wrong!)
2003-08-12 17:16:53 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
grant c330a8c5ed Discs->Disks 2003-08-05 20:01:25 +00:00
jdolecek ecb9302c7f if kvm_nlist() fails, nlisterr() would be called before the screen
curses context would be initialized; just use errx() instead in this case
this fixes coredump for cases like 'systat -N /netbsd.gz', reported by Walt
on port-i386

in nlisterr(), wait a while (5 seconds currently) before exiting, so that
it would be actually possible to actually see the error
2003-08-03 12:14:58 +00:00
jdolecek 37870ec770 mark nlisterr() as 'noreturn' 2003-08-03 11:56:57 +00:00
dsl aaba6e7d29 No need to resizeterm() if size not changed.
On 'fg' just restore old screen contents.
2003-07-05 08:05:51 +00:00
dsl 5ae48961f9 Redraw addresses after screen refresh 2003-07-05 06:48:52 +00:00
wiz ba22178ad0 Quote question mark. Change width argument in a table to line up 2003-06-27 09:38:58 +00:00
drochner 96b62d8a69 no need to #include <sys/dkstat.h> 2003-06-11 17:26:31 +00:00
dsl 31cb6aba03 Reinstate our STOP handler before curses installs its one.
Ensures that both handlers are executed on subsequent stops.
2003-05-28 20:17:14 +00:00
itojun 0e1bb4cd82 use strlcat/strlcpy 2003-05-17 21:03:21 +00:00
itojun 5bce78caa7 use strlcpy 2003-05-15 01:00:07 +00:00
perry da63de702d refreshs->refreshes
reactived->reactivated
intransit->in-transit
from Igor Sobrado, PR misc/19700
2003-03-31 02:16:37 +00:00
wiz 990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
dsl 9f46bb077a Create subwins that end one line from the bottom of the screen even
after the window is resized.
2003-02-24 10:10:00 +00:00
dsl 34e0475375 Pivot the disk stats into extra lines if they run out of columns
(approved by christos)
2003-02-18 14:55:05 +00:00
dsl c4ccc4eaf4 Fiddle with screen layout to generate room for longer labels on the
interrupt count fields.
(approved by christos)
2003-02-17 19:30:33 +00:00
dsl c22a42ecd8 Avoid displaying "intr" for all interrupt counter titles
(approved by christos)
2003-02-13 08:09:33 +00:00
dsl d616c663f8 Resize windows on SIGWINCH and restart from SIGTSTP
(approved by christos)
2003-02-10 23:59:48 +00:00
dsl b3467bbf38 When disk activity exceeds 100kB/s divide length of bar by 10s and report
factor on RHS screen.
(approved by christos)
2003-02-01 19:12:30 +00:00
dsl 85ed0bb278 Make kernel address arg of kvm_ckread() const void * so caller doesn't
need a cast.
(approved by christos)
2003-01-20 18:24:03 +00:00
christos 8e448c92b9 kill warns. 2003-01-18 21:18:18 +00:00
dsl 24ec5512d1 pull interrupt stats from event counts
fix disk xfer byte count
fix absolute counts - were divided by time interval
2003-01-18 21:02:35 +00:00
thorpej 3fdac2b8c5 Merge the nathanw_sa branch. 2003-01-18 10:52:16 +00:00
wiz 7e681f7063 interrupt with two rs. 2003-01-06 13:04:54 +00:00
kristerw 5fa174af73 Prevent the "kBps" field from overflowing for values > 1M/s.
From Paul Shupak in PR 18822.
2002-12-29 19:03:56 +00:00
thorpej 9f3eaa5002 Remove extra args from a printf. 2002-12-06 03:13:14 +00:00
itojun 5f2d0b666f error handling on strdup failure 2002-11-16 15:59:26 +00:00
mrg 3cf4c73d05 iostat(8) and systat(8) support for separate read/write disk statistics.
"iostat -x" now shows these (ala linux/solaris), but this is only splitting
the read/write bytes/transactions, not adding any new metrics.  "systat
iostat" now has two new commands to switch between combined/separate mode
for both it's numbers & bar modes.
2002-11-01 12:47:55 +00:00
christos 836efa3eb4 PR/18408: Chris Demetriou: Kilo is abbreviated using a small k not a CAPITAL K. 2002-09-25 13:50:39 +00:00
lukem 5d4973fe97 makefile delint. use NETBSDSRCDIR as appropriate 2002-09-18 14:00:33 +00:00
abs 3dbe098822 introduce puthumanint() which calls humanize_number(), and use to
display disk transfer values (Suggested by Simon Burge). Also clip
%busy to 100 and display as an int which has the useful side effect
of stopping it overflowing into the next column (100.0).
2002-08-08 17:06:31 +00:00
christos 84610072e6 scan utmpx/utmp. 2002-08-01 23:36:54 +00:00
sommerfeld f80c7eebd7 Since the KERN_CP_TIME sysctl reports total clock ticks across all
cpus and hz is measured in ticks per cpu, divide tick count by ncpu to
determine elapsed time since last sample.

Fixes I/O rate deflation observed on multiprocessors.
2002-06-30 00:10:33 +00:00
itojun cc0c94e480 format fix in number mode. PR 16911 2002-06-09 07:14:32 +00:00
kleink 697af10002 From Simon Burge: remove orphaned reference to _total; fixes PR bin/16804. 2002-05-15 06:43:37 +00:00