Commit Graph

21 Commits

Author SHA1 Message Date
wiz
d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
drochner
96b62d8a69 no need to #include <sys/dkstat.h> 2003-06-11 17:26:31 +00:00
itojun
5f2d0b666f error handling on strdup failure 2002-11-16 15:59:26 +00:00
simonb
b9c304a9e0 Pass all three mib items to a sysctl in dkreadstats().
Use the new kernel sysctl sizing code to calculate the number of drives.
2002-11-01 15:23:06 +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
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
enami
41e1be38c5 - Kill whitespaces at the end of line.
- Wrap long line.
2002-02-25 00:39:04 +00:00
simonb
0f944ef22b Use the new disk and tty stats sysctls when operating on a live kernel,
dk*() don't need to worry about setgid() games anymore.
2002-01-28 02:15:15 +00:00
wiz
9fa0b17629 Give initiali[sz]e all the "i"s it deserves. 2001-09-18 18:15:49 +00:00
christos
717b628383 move extern at a global scope. 2001-06-03 04:02:34 +00:00
enami
1afed7103d Cosmetic changes. 2001-01-27 11:08:23 +00:00
simonb
80bd9216d2 ANSIfy. 2000-11-30 23:59:03 +00:00
itojun
bbef2fbaac errx?/warnx? audit. do not pass variable alone, use %s. idea from openbsd 2000-07-07 15:10:32 +00:00
thorpej
13ba787e60 Use kern.cp_time to fetch cp_time[]. Don't support fetching it from
crash dumps yet, as that requires determining which CPU we should fetch
it from, etc.
2000-06-04 16:06:25 +00:00
thorpej
ae67003975 Need to include <sys/sched.h> to get cp_time-related constants. 2000-06-03 21:00:42 +00:00
perry
bfd526219d bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-10 02:57:23 +00:00
drochner
b2058e2f38 Fix handling of privileges - the gid was given up before dkinit()
was called.
Pass the gid to use for KVM access explicitely to dkinit(), the caller
decides whether to call setgid(getgid()) or not.
1998-07-19 17:47:07 +00:00
mrg
80efe80bc9 - change setgid kmem programs (that lend themselves to this) so setegid(getgid())
and the top, and then set the effective gid back to kmem around the call to
  kvm_openfiles().  this reduces the time group kmem is available.
- for those above that also allow this, setgid(getgid()) after the call to
  kvm_openfiles() to fully revoke priviledges.
- some KNF
- use err(3) over fprintf(3) in some places
1998-07-06 07:50:18 +00:00
mrg
5dfbe405c5 KNF. 1998-07-05 08:02:34 +00:00
kleink
21a53ba722 Don't assume that an inclusion of <sys/time.h> makes visible all definitions
from <sys/types.h>.
1998-04-01 16:41:31 +00:00
thorpej
1eaf5ee379 New userland code to read the statistics kept by the NetBSD generic
disk framework, from John M. Vinopal <banshee@gabriella.resort.com>
1996-05-10 23:16:30 +00:00