Commit Graph

81 Commits

Author SHA1 Message Date
dennis
7ad3371ebc Update stats-keeping in sys/kern/vfs_cache.c to remove (most)
races while allowing consistent lockless sampling of the per-cpu
statistics without atomic operations.  Update comment describing
the locking protocol to include this.

These files were fumble-fingered out of the last commit.
2014-12-24 20:01:21 +00:00
njoly
e75f143af6 Remove fagile test which ensured that first namelist element (was
X_NCHSTATS) had a known type. Make disk stats available again for
vmstat display.
2014-06-20 07:08:15 +00:00
joerg
10aed88aaf GC X_NCHSTATS 2014-06-14 20:10:42 +00:00
joerg
94adc2671a Provide sysctl for namecache statistics. 2014-06-03 21:16:15 +00:00
njoly
ea02939c73 Add per process cache values to the total name translations count. 2010-04-30 16:21:05 +00:00
njoly
e7ebb0154e In vmstat display, add one more column to output memory values. Avoid
overflow with more than 100GB.
2010-04-30 13:49:22 +00:00
rmind
40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
wiz
d5ecf43f6a Fix problems with SIGWINCH. From Paul Ripke in PR 42161. 2009-10-21 13:56:36 +00:00
lukem
e7a39c4fb6 Fix -Wsign-compare issues 2009-04-13 23:20:27 +00:00
njoly
90a93774af In vmstat display, increase software interrupt count output from 5 to
6 columns.
2009-03-09 19:48:02 +00:00
dholland
16e3bec279 Clarify how one is supposed to use the pointers returned by getutentries()
(the utmpentry.c code), specifically with respect to who owns them and
when to free them. Now they're owned by utmpentry.c, only. Abolish the
freeutentries() function, which was the wrong abstraction; add instead
endutentries(), which flushes out the internally managed memory.

Update callers as necessary. Some (e.g. talkd) had been leaking memory;
others (e.g. syslogd) had been accidentally freeing and reloading utmp
more often than necessary. There are a couple untidy bits in users and
rwhod that someone should look after sometime, maybe.

Fixes PR bin/35131, which was about talkd's memory leak.
2008-07-13 20:07:48 +00:00
dyoung
4ef6fc056a #include <sys/evcnt.h> instead of <sys/device.h>, since the former
is sufficient, anyway.  Do not needlessly #include <sys/device.h>.

Note well: device_t is not part of the kernel ABI.
2008-02-11 03:51:17 +00:00
christos
8a3920f2c8 use c99 initializers
consistently terminate nlist arrays with NULL not ""
2006-10-22 16:43:24 +00:00
dsl
35fde98d40 Reduce the field widths for the summary line of traps, system calls
and interrupts so that the numbers don't all run into one.
2006-05-21 20:22:34 +00:00
christos
abcf3383b8 Gcc 4 needs to have the enum declaration in scope to determine the enum size. 2006-05-14 02:56:27 +00:00
yamt
ee458ef97e include errno.h directly rather than via user.h. 2006-05-11 12:01:33 +00:00
blymn
e48af18bc5 Update to use new kernel io statistics. 2006-04-14 13:14:06 +00:00
dsl
7ee2912cf6 free() intrnamebuf, intrname and intrloc on entry so we don't leak them
every time initvmstat() is called.
Change intrnamebuf to be static so this works.
Inspired by Coverty CID 2072 (incorrectly) reporting that the memory assigned
to intrnamebuf wasn't being freed.
2006-03-20 20:36:38 +00:00
dsl
bee1c2beb6 Make the functions that display the top 8 lines externally visible so
they can be used to head other pages (not ready to commit yet...).
Use puthumanint() for oversize numbers when display_mode is RUN or BOOT (when
very big numbers are to be expected).
Allow an extra column for Csw..Flt.
Adjust some #defines to avoid use of global s & s1.
2006-03-18 14:58:49 +00:00
dsl
228802f437 Split dkreadstats() into dkreadstats(), tkreadstats() and cpureadstats().
Similarly for dkswap().
Allows code to only call one of these.
Rename struct _disk to _vminfo to be nearer its contents.
Change 'systat vm' so that it always shows the 'current' cpu times, even
after ':run' or ':boot' commands. The code in vmstat.c doesn't support :run.
2006-02-05 09:54:50 +00:00
blymn
132bb1fe89 Add tape statistics. 2005-08-07 12:32:38 +00:00
chs
d5b80101e7 do not rely on the pre-evcnt interrupt counter kernel symbols being present.
if they do not exist, then interrupt stats are all in evcnts.
2005-05-22 14:00:59 +00:00
dsl
019733f61e WARNS=3 2005-02-26 22:12:33 +00:00
christos
b74b94a591 PR/29505: Nicolas Joly: Increase width of csw value in systat vmstat. 2005-02-22 15:13:57 +00:00
christos
29e8340e26 PR/29213: Nicolas Joly: sysstat(1) vmstat cannot display large memory values 2005-02-03 16:16:00 +00:00
mycroft
b00b298ce8 Fix a display glitch when blanking out drive columns. 2004-06-13 08:56:21 +00:00
itojun
407df6861c realloc pedant 2003-09-19 07:08:50 +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
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
drochner
96b62d8a69 no need to #include <sys/dkstat.h> 2003-06-11 17:26:31 +00:00
itojun
5bce78caa7 use strlcpy 2003-05-15 01:00:07 +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
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
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
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
kleink
697af10002 From Simon Burge: remove orphaned reference to _total; fixes PR bin/16804. 2002-05-15 06:43:37 +00:00
augustss
550d5dae5a Make it compile (more vmstat fallout). 2002-01-28 13:20:43 +00:00
augustss
6778fe934d Since the system call and trap rates are often 5 digit numbers these
days we move the columns a little to avoid running into other numbers.
2001-09-28 11:58:51 +00:00
simonb
828483a73e Remove extern variables and functions now declared in dkstats.h.
While here, remove 77 (!) unneed #includes.
2000-12-01 02:19:43 +00:00
simonb
ba632e7078 Use the vm.uvmexp2 sysctl. 2000-11-29 11:18:33 +00:00
ad
fc3915475d - Add boot', run', time' and zero' commands to all IP displays. These work
as in the `vmstat' display mode. The default mode is now `time', not `boot'.
- ANSIfy.
- s@kre\(@vmstat\(@.
- __RCSID() police.
- Tweak inet.icmp display visual a little.
2000-07-05 11:03:20 +00:00
mrg
8d4795719a remove include of <vm/vm.h> 2000-06-29 06:26:33 +00:00