summaryrefslogtreecommitdiffstats
path: root/usr.bin/vmstat/vmstat.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-2/+2
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* no need to kvm the palloc. the pgsize is more correctly accessed via pool.tedu2014-12-191-11/+2
|
* <sys/buf.h> isn't actually needed hereguenther2014-11-231-2/+1
| | | | ok tedu@
* Remove non-standard <sys/dkstat.h> header. It has not contained anythingmiod2014-09-151-2/+2
| | | | | | | | | | related to disk stastics for almost 17 years, and the remaining userland-visible defines duplicate those found in <sys/sched.h>. Move the remaining _KERNEL defines to <sys/tty.h> where they belong, and update all users to cope with this. ok kettenis@
* Display zero page hit and miss counters in vmstat -s.kettenis2014-07-131-1/+3
| | | | ok deraadt@
* decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hderaadt2014-07-081-4/+1
| | | | | don't need to be married. ok guenther miod beck jsing kettenis
* populate pool npages, as per src/sys/kern/subr_pool.c r1.135dlg2014-07-021-1/+2
|
* info about pools is currently given to userland by copying eachdlg2014-07-021-9/+35
| | | | | | | | | | | | | | | | | | | | | | | pools struct out. however, struct pool in the kernel contains lots of things that userland probably isnt interested in, like actual mutexes, and probably shouldnt get easy access to, like pointers to kernel memory via all the lists/trees. this implements a kinfo_pool structure that has only the data that userland needs to know about. it cuts the sysctl code over to building it from struct pool as required and copying that out instead, and cuts userland over to only handling kinfo_pool. the only problem with this is vmstat, which can read kernel images via kvm, which needs some understanding of struct pool. to cope, the struct pool definition is guarded by if defined(_KERNEL) || defined(_LIBKVM) as inspired by sysctl which needs to do the same thing sometimes. struct pool itself is generally not visible to userland though, which is good. matthew@ suggested struct kinfo_pool instead of struct pool_info. the kinfo prefix has precedent. lots of people liked this.
* Use VM_UVMEXP instead of VM_METER for memory usages and directlympi2014-04-081-2/+5
| | | | | | | include <sys/vmmeter.h> where it is needed instead of relying on it being included by <uvm/uvm_extern.h>. miod@ likes it, ok guenther@
* unsigned char casts for ctypederaadt2013-11-261-2/+2
| | | | ok okan
* remove unused variableschl2013-11-131-4/+2
| | | | ok mikeb@ bluhm@
* sometimes we find .h we no longer needderaadt2013-10-311-2/+1
|
* Obtain the uptime of the running system using the new CLOCK_UPTIME,guenther2013-10-081-25/+14
| | | | | | | so that averages/rates are over the actual time-running-not-suspended. For kernel cores, peek at the 'time_uptime' and 'naptime' variables. original report by and ok mlarkin@
* Correct format string mismatches turned up by -Wformat=2guenther2013-08-221-2/+2
| | | | suggestions and ok millert@
* There is no uvm_km_pages_free in our kernel anymore. The correspondingbluhm2013-07-181-5/+1
| | | | | | | lines in dopool_sysctl() have been removed from vmstat.c revision 1.116. Remove uvm_km_pages_free from dopool_kvm() to allow analysing a core dump. OK guenther@ miod@
* Don't display swapin/swapout uvmexp fieldsmiod2013-05-141-3/+1
|
* i broke it. tailq is now simpleq in pool.tedu2013-03-261-4/+4
| | | | found the hard way by otto.
* remove rfork(); ok guenther miodderaadt2012-04-121-4/+4
|
* Make KERN_CPTIME return an avarage number of ticks across all CPUsmikeb2010-11-191-9/+1
| | | | tedu agreed with an idea, tested by Luis Useche and me; ok deraadt
* remove unused variablechl2010-08-011-2/+2
| | | | ok thib@
* Remove the VM_KMPAGESFREE sysctl. After the pmemrangethib2010-07-221-13/+1
| | | | | | | | | | | changes it was returing a constant 0, changing to cope with those changes makes less sense then just removing as it provides the user with no usefull information. sthen@ grepped the port's tree for me and found not hits, thanks! OK deraadt@, matthew@
* Remove setresguid since it is no longer needed.lum2010-07-201-17/+2
| | | | ok matthew@ millert@ deraadt@
* don't repeat the banner if not a tty.tedu2009-11-221-3/+8
| | | | | | add a -c count option to netstat. tweak spacing to not smear fields in vmstat. ok deraadt sthen
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-15/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* Use guaranteed 64-bit arithmetic for the name lookup statistics andnaddy2009-09-301-15/+13
| | | | | zap the PCT() macro that was a holdover from before we had prototypes. ok gilles@, deraadt@
* use (unsigned) in rate calculation for > 2 billion interrupts. This willderaadt2008-10-081-3/+3
| | | | | | do until when we tweak struct uvmexp to have unsigned 64 bit counters, and when we do, it will not break. from PR 4046, ok millert
* "InUse" is much more interesting than "Releases" for pools. ok beck@otto2008-09-081-4/+4
| | | | deraadt@ art@
* use ellipsis to show that more than one disk is allowedsobrado2008-03-161-3/+3
| | | | ok jmc@
* minor improvement on the diff to r1.106sobrado2007-12-301-3/+3
| | | | ok jsing@
* change over last few bits to use sysctl(3) if possible, and make thisderaadt2007-12-151-35/+17
| | | | | not setgid kmem (hurray!) ok tedu, tested jsg
* patch to improve vmstat(8) output:sobrado2007-10-261-9/+9
| | | | | | | | - the "fre" column width is increased - adds a whitespace between the "avm" and "fre" columns - aligns the "memory" and "traps" labels with their column sets ok millert@
* Use a sig_atomic_t instead of an int when setting it from a signal handlercloder2007-09-131-3/+4
|
* Fix error messages, okay ray@ deraadt@pedro2006-10-021-4/+4
|
* spacingderaadt2006-03-311-6/+6
|
* lint-driven cleanup. nothing too scary in this diff.deraadt2006-03-311-41/+37
|
* delint; from David Hillotto2006-03-131-13/+13
|
* remove unused variablemartin2006-02-231-4/+2
|
* namelist must be NULL terminated, plus some cleanup after mickeymartin2006-02-111-4/+4
| | | | ok mickey@
* include uvm_km_pages_free into the pool accounting as it is the main consumer of it; feedback from millert@ and tedu@ okmickey2006-01-311-4/+34
|
* make -s print information about kmapent as well, reminded by deraadt@pedro2005-09-281-2/+3
|
* make these use setres[ug]id for simple privilege dropping;djm2005-07-041-10/+12
| | | | ok deraadt@ millert@ moritz@
* print out fpu ctx switches countmickey2005-04-211-2/+3
|
* In vmstat -i, stop walking the kernel "allevents" evcnt chain, as they aremiod2004-12-241-25/+3
| | | | not incremented anymore. Kernel-side code will be removed in a few weeks.
* Stop looking at intrcnt[] for vmstat -i; this means vmstat -i only worksmiod2004-11-281-76/+8
| | | | | on live kernels now, though. ok deraadt@
* use warn() instead of printf() + strerror()pedro2004-11-091-7/+5
| | | | ok hshoexer@ jaredy@ deraadt@
* do not shrink the field width...deraadt2004-09-231-10/+10
|
* adapt to KERN_INTRCNT_CNT becoming a quad; ok tedu, and pulling in somederaadt2004-09-231-19/+25
| | | | changes written by danh
* Do not divide by zero in vmstat -t; Nikos Ntarmos.miod2004-07-021-5/+8
|
* add -vz to usage();jmc2004-06-281-3/+3
|
* Remove special #if defined(__i386__) code from systat and vmstat. We now useaaron2004-06-281-100/+29
| | | | | | sysctl to fetch interrupt counters on all architectures. Also add new '-z' flag to vmstat which means show all devices, even those that have not yet generated an interrupt. deraadt@ tholo@ drahn@ millert@ ok