aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/vmstat
Commit message (Collapse)AuthorAgeFilesLines
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-112-8/+0
| | | | | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson Notes: svn path=/head/; revision=216370
* Remove unused variableKevin Lo2010-11-201-1/+1
| | | | Notes: svn path=/head/; revision=215569
* mdoc: drop redundant .Pp and .LP callsUlrich Spörlein2010-10-081-1/+0
| | | | | | | They have no effect when coming in pairs, or before .Bl/.Bd Notes: svn path=/head/; revision=213573
* Add a new column to the output of vmstat -z to indicate the numberSean Bruno2010-06-151-4/+5
| | | | | | | | | | | | | | | | of times the system was forced to sleep when requesting a new allocation. Expand the debugger hook, db_show_uma, to display these results as well. This has proven to be very useful in out of memory situations when it is not known why systems have become sluggish or fail in odd ways. Reviewed by: rwatson alc Approved by: scottl (mentor) peter Obtained from: Yahoo Inc. Notes: svn path=/head/; revision=209215
* Allow sub-second interval timings for iostat and vmstat.Sean Bruno2010-05-212-6/+17
| | | | | | | | | | | | | | e.g. vmstat -w.5 iostat -w.5 Reviewed by: jhb Approved by: scottl (mentor) Obtained from: Yahoo Inc. MFC after: 2 weeks Notes: svn path=/head/; revision=208389
* Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-0/+2
| | | | | | | Also add some missing $FreeBSD$ to keep svn happy. Notes: svn path=/head/; revision=201386
* When fetching sum stats (vmstat -s) from a crash dump, fetch per-CPU countsJohn Baldwin2009-10-291-0/+81
| | | | | | | | | | | and sum them to form the total counts. PR: bin/135893 Submitted by: Mikolaj Golub to my trociny of gmail MFC after: 1 week Notes: svn path=/head/; revision=198620
* Utilize calloc() instead of bzero'ing manually.Xin LI2009-02-211-8/+4
| | | | Notes: svn path=/head/; revision=188888
* Fix comment typo that managed to sneak in when I copy pasted someGiorgos Keramidas2008-11-041-1/+1
| | | | | | | comments & code from iostat. Notes: svn path=/head/; revision=184646
* Repeat vmstat header after window.rows instead of a hardcoded 20.Giorgos Keramidas2008-11-041-9/+69
| | | | | | | | | | | | | | | Use ioctl() to get the window size in vmstat(8), and force a new header to be prepended to the output every time the current window size changes. Change the number of lines before each header to the current lines of the terminal when the terminal is resized, so that the full terminal length can be used for output lines. Inspired by: svn change 175562 (same feature for iostat) Reviewed by: ru (who fixed some of my bugs too) MFC after: 1 week Notes: svn path=/head/; revision=184645
* Use kvm_getcptime(3) to fetch the global CPU time stats from a crashdumpJohn Baldwin2008-08-191-15/+14
| | | | | | | | | | since the 'cp_time' symbol doesn't exist in recent kernels. This fixes iostat and vmstat on crash dumps. MFC after: 1 week Notes: svn path=/head/; revision=181881
* Add forgotten -H, -h, and -P to usage().Ruslan Ermilov2008-04-101-1/+1
| | | | Notes: svn path=/head/; revision=178063
* Fix some boolean logic errors. && vs & and other sillyness. *blush*Peter Wemm2008-01-181-3/+3
| | | | | | | | | This would prevent it from skipping non-present cpus in -P output. Submitted by: Pieter de Goeje <pieter@degoeje.nl> Notes: svn path=/head/; revision=175465
* Add the -H, -h and -P flags to vmstat. -P causes per-cpu output ofPeter Wemm2007-12-133-20/+207
| | | | | | | | | user/system/idle stats. -h feeds the memory column through humanize_number() to reduce the amount of column overflowing. -H turns this off. -h is turned on by default if stdout is a tty. Notes: svn path=/head/; revision=174573
* Add a counter for the total number of pages cached and support forAlan Cox2007-07-271-0/+2
| | | | | | | | | reporting the value of this counter in the program "vmstat". Approved by: re (rwatson) Notes: svn path=/head/; revision=171633
* - Revert signedness type changes to "struct vmtotal"; by makingRuslan Ermilov2006-11-281-4/+3
| | | | | | | | | | | | | | | | | them unsigned I made the possible overflows hard to detect, and it only saved 1 bit which isn't principal, even less now that the underlying issue with the total of virtual memory has been fixed. (For the record, it will overflow with >=2T of VM total, with 32-bit ints used to keep counters in pages.) - While here, fix printing of other "struct vmtotal" members such as t_rq, t_dw, t_pw, and t_sw as they are also signed. Reviewed by: bde MFC after: 3 days Notes: svn path=/head/; revision=164718
* Oops, fix the format specifier to what was intended.Ruslan Ermilov2006-11-231-2/+1
| | | | Notes: svn path=/head/; revision=164556
* - Fix types of "struct vmmeter" members so they are unsigned.Ruslan Ermilov2006-11-201-4/+6
| | | | | | | | | | - Fix overflow bugs in sysctl(8), systat(1), and vmstat(8) when printing values of "struct vmmeter" in kilobytes as they don't necessarily fit into 32 bits. (Fix sysctl(8) reporting of a total virtual memory; it's in pages too.) Notes: svn path=/head/; revision=164443
* Cross-reference libmemstat(3), malloc(9), uma(9).Robert Watson2006-11-021-4/+10
| | | | Notes: svn path=/head/; revision=163921
* The vm.zone sysctl has gone; zone stats are now supplied by libmemstat(3).Ruslan Ermilov2006-10-211-4/+1
| | | | Notes: svn path=/head/; revision=163563
* - Add comma after REQUESTS field missed in previous commit.Ruslan Ermilov2006-10-211-2/+2
| | | | | | | - Widen some columns; make width of header columns less cryptic. Notes: svn path=/head/; revision=163562
* Print the number of allocation failures in UMA zones.Gleb Smirnoff2006-10-211-4/+4
| | | | | | | PR: kern/102940 Notes: svn path=/head/; revision=163560
* Markup fixes.Ruslan Ermilov2006-09-291-1/+1
| | | | Notes: svn path=/head/; revision=162792
* Increase the field widths of flt (total number of page faults), fr (pagesDavid E. O'Brien2006-06-031-5/+5
| | | | | | | | freed), & cs (CPU context switch rate). 'vmstat 1' output is now lined up for today's typical machines vs. a VAX. [tested my modest 1.6ghz laptop] Notes: svn path=/head/; revision=159200
* Default number of direct access devices had been changed from three to two.Dmitry Morozovsky2006-02-121-6/+6
| | | | | | | | | | | Reflect this in other paragraphs. PR: 93201 Submitted by: Marian Cerny MFC After: 1 week Notes: svn path=/head/; revision=155567
* Obtain true uptime through clock_gettime(CLOCK_MONOTONIC, struct *timespec)Andre Oppermann2005-10-171-16/+4
| | | | | | | | | instead of subtracting 'bootime' from 'now'. Sponsored by: TCP/IP Optimization Fundraise 2005 Notes: svn path=/head/; revision=151417
* Use libmemstat(3)'s kvm support for malloc(9) rather than hand-extractingRobert Watson2005-08-061-96/+19
| | | | | | | this information from the core dump. Notes: svn path=/head/; revision=148790
* Teach vmstat's domemstat_zone() to use memstat_kvm_uma() when the kvmRobert Watson2005-08-011-14/+19
| | | | | | | | descriptor is non-NULL, restoring vmstat -z support for core dumps and kmem access. These were broken with the introduction of UMA. Notes: svn path=/head/; revision=148630
* Minor syntax tweaks:Robert Watson2005-07-281-17/+0
| | | | | | | | | | | | | - Remove some extra blank lines. - Remove comments that don't contribute to understanding. - Remove additional blank lines in output added to maximize compatibility with older vmstat output, but that is actually somewhat gratuitous. Submitted by: bde MFC with: other vmstat libmemstat(3) changes Notes: svn path=/head/; revision=148472
* Teach vmstat -m and vmstat -z to use libmemstat(3). CertainRobert Watson2005-07-252-23/+96
| | | | | | | | | | | | | | statistics from -z are now a bit different due to changes in the way statistics are now measured. Reproduce with some amount of accuracy the slightly obscure layouts adopted by the two kernel sysctls. In the future, we might want to normalize them. GC dosysctl(), which is now no longer used. MFC after: 1 week Notes: svn path=/head/; revision=148413
* Modify vmstat(8)'s domem() routine, which is responsible for extractingRobert Watson2005-05-291-7/+38
| | | | | | | | | | malloc(9) statistics from kernel memory or a kernel coredump, to catch up with recent changes to adopt per-CPU malloc(9) statistics. The new routines walk the per-CPU statistics pools and coalesce them for presentation to the user. Notes: svn path=/head/; revision=146748
* Interlink systat(1), iostat(8) and vmstat(8) through their SEE ALSOGiorgos Keramidas2005-05-261-0/+1
| | | | | | | sections, so that users of one can learn about the others easily. Notes: svn path=/head/; revision=146650
* Sync program's usage() with manpage's SYNOPSIS.Ruslan Ermilov2005-05-211-2/+2
| | | | Notes: svn path=/head/; revision=146466
* Fix an overflow when calculating the number of kilobytes from thePaul Saab2005-02-211-1/+1
| | | | | | | | | number of pages. Obtained from: Yahoo! Notes: svn path=/head/; revision=142175
* Sort sections.Ruslan Ermilov2005-01-181-7/+7
| | | | Notes: svn path=/head/; revision=140420
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-6/+12
| | | | Notes: svn path=/head/; revision=131491
* Make vmstat -m work with -M/-N again. Note that making vmstat -z workBrian Feldman2004-06-301-11/+93
| | | | | | | | is much harder, and -m is grossly using unexported interfaces (that is, the array of malloc zones/sizes does not have an exported type). Notes: svn path=/head/; revision=131300
* Bumped the document date.Ruslan Ermilov2004-05-191-1/+1
| | | | Notes: svn path=/head/; revision=129435
* Print fork statistics with %u as they are unsigned quantities.Tim J. Robbins2004-04-231-3/+3
| | | | | | | | PR: 65889 Submitted by: Ken Stailey Notes: svn path=/head/; revision=128573
* Properly document the -M and -N options.Ruslan Ermilov2004-03-262-9/+19
| | | | Notes: svn path=/head/; revision=127452
* Fixed a misspelling of 0 as NULL.Bruce Evans2004-03-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed a nearby bug. The "play it safe" code in dosysctl() was unsafe because it overran the buffer by 1 if sysctl() filled all of the buffer. Fixed a nearby style bug in output. Not just 1, but 2 extra newlines were printed at the end by "vmstat -m" and "vmstat -z". Don't print any newlines explicitly. This depends on 2 of the many formatting bugs in the corresponding sysctls. First, the sysctls return an extra newline at the end of the strings. This also messes up output from sysctl(8). Second, the sysctls return an extra newline at the beginning of the strings. This is good for separating the 2 tables output by "vmstat -mz" and for starting the header on a new line in plain sysctl output, but gives a bogus extra newline at the beginning for "vm -[m | z]" and "sysctl -n [kern.malloc | vm.zone]". Fixed some nearby style bugs in the source code: - the same line that misspelled 0 as NULL also spelled NULL as 0. - the size was doubled twice in the realloc loop. - the "play it safe" comment was misleading. Terminating the buffer is bogus because dosysctl() is only meant to work with sysctls that return strings and the terminator is part of a string. However, the kern.malloc sysctl has more than style bugs. It also doesn't return a string. Termination is needed to work around this bug. Notes: svn path=/head/; revision=126842
* Put libdevstat before libkvm, because the former depends on the latter.Ruslan Ermilov2004-02-041-2/+2
| | | | Notes: svn path=/head/; revision=125431
* Remove an unused variable.David Malone2003-12-251-2/+1
| | | | | | | Add some missing constness. Notes: svn path=/head/; revision=123825
* Fixed misplacement of __FBSDID(). Backed out editing of vendor id lines.Bruce Evans2003-12-111-6/+7
| | | | | | | Just wrap them in #if 0...#endif. Notes: svn path=/head/; revision=123441
* Revert part of revision 1.74 after bde reminded me of a detail I'dDag-Erling Smørgrav2003-12-111-4/+7
| | | | | | | | forgotten about how sysctl works. This removes a potential (though not very likely) race that 1.74 introduced. Notes: svn path=/head/; revision=123438
* Whitespace cleanup.Dag-Erling Smørgrav2003-12-101-36/+36
| | | | Notes: svn path=/head/; revision=123414
* Remove debugging printfDag-Erling Smørgrav2003-12-101-1/+0
| | | | Notes: svn path=/head/; revision=123411
* Document the simpler -a semantics.Dag-Erling Smørgrav2003-12-101-3/+0
| | | | Notes: svn path=/head/; revision=123410
* Fix a couple of issues in the interrupt code:Dag-Erling Smørgrav2003-12-101-21/+13
| | | | | | | | | | | | | | | | | | - Replace overly-complicated (and buggy) -a logic with a much simpler version: -a causes all interrupts to be displayed, otherwise only those that have occurred are displayed. This removes the need for any MD code. - Instead of just making sure intrcnt is large enough, figure out the exact size it needs to be. We derive nintr from this number, and we don't want to risk printing garbage. Note that on sparc64, we end up printing garbage anyway because the names of non-existent interrupts are left uninitialized by the kernel. Tested on: alpha, i386, sparc64 Notes: svn path=/head/; revision=123409
* s/u_(int|long)\>/unsigned \1/Dag-Erling Smørgrav2003-12-101-15/+15
| | | | Notes: svn path=/head/; revision=123407