summaryrefslogtreecommitdiffstats
path: root/usr.bin/vmstat
AgeCommit message (Collapse)AuthorFilesLines
2019-12-06replace links to uvm(9) to uvm_init(9); ok mpijmc1-4/+4
2019-11-28ks_mapblocks is goneguenther1-4/+4
2019-10-14pledge() won't work but we can use unveil() to reduce filesystem accessderaadt1-8/+12
in these 3 related programs (they borrow parts of each other using .PATH) Hopefully no regressions, ktrace checks by myself and mestre
2019-10-14some knf, preparing for other changesderaadt1-8/+6
2019-08-12Add the CP_SPIN time to the sum of system time reported.claudio1-2/+2
OK kettenis@
2019-06-28When system calls indicate an error they return -1, not some arbitraryderaadt2-34/+35
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2018-06-19Rename some unused fields in struct uvmexp tokrw1-3/+1
unusedNN. Missing man page bits pointed out by jmc@. Ports source scan by sthen@. ok deraadt@ guenther@
2018-04-26Prefer <fcntl.h> over <sys/fcntl.h> in userlandguenther1-9/+10
While here, delete some extra #includes and apply style(9) sort rules. ok deraadt@ krw@ mpi@
2018-04-10typo: "anon's" -> "anons"mlarkin1-3/+3
ok jmc, krw, deraadt
2017-12-08remove description of 'at' field which was removed from vmstat.c -r1.21jasper1-4/+2
2017-05-30rename variable to avoid shadow. from Brian Callahantedu1-7/+7
2017-05-10There's no difference between short and long sleepers, so just printmpi2-16/+10
their number. While here print the amount of memory in M instead of K to make the output fit it 80 columns. Reminded by tb@, ok visa@
2016-09-04straightforward realloc -> reallocarray conversiontb1-53/+53
ok deraadt, guenther, tedu
2016-08-14Convert %q to %ll and cast opaque system values to long long.guenther1-6/+5
Use uint64_t for the KERN_INTRCNT_CNT sysctl() ok krw@
2016-07-27increase the size of forkstat fields to accomodate large valuestedu1-5/+5
2016-03-30some Xr adjustment to catch up with MLINKS removal;jmc1-3/+3
2015-12-24Replace bzero with memset. No binary change.mmcc2-14/+14
ok tb@
2015-04-18Convert many atoi() calls to strtonum(), adding range checks and failurederaadt1-2/+8
handling along the way. Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert
2015-01-30improve argv checking. drive name, if given, must match something.tedu1-5/+12
convert atoi to strtonum. ok deraadt
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2-4/+3
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)
2014-12-19no need to kvm the palloc. the pgsize is more correctly accessed via pool.tedu1-11/+2
2014-11-23<sys/buf.h> isn't actually needed hereguenther1-2/+1
ok tedu@
2014-09-15Remove non-standard <sys/dkstat.h> header. It has not contained anythingmiod2-4/+4
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@
2014-07-16zap trailing newlines; "go for it" deraadtokan1-2/+1
2014-07-13Display zero page hit and miss counters in vmstat -s.kettenis1-1/+3
ok deraadt@
2014-07-08decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hderaadt1-4/+1
don't need to be married. ok guenther miod beck jsing kettenis
2014-07-02populate pool npages, as per src/sys/kern/subr_pool.c r1.135dlg1-1/+2
2014-07-02info about pools is currently given to userland by copying eachdlg2-9/+36
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.
2014-04-08Use VM_UVMEXP instead of VM_METER for memory usages and directlympi1-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@
2013-11-26unsigned char casts for ctypederaadt1-2/+2
ok okan
2013-11-13remove unused variableschl1-4/+2
ok mikeb@ bluhm@
2013-10-31sometimes we find .h we no longer needderaadt1-2/+1
2013-10-08Obtain the uptime of the running system using the new CLOCK_UPTIME,guenther1-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@
2013-08-22Correct format string mismatches turned up by -Wformat=2guenther1-2/+2
suggestions and ok millert@
2013-07-18There is no uvm_km_pages_free in our kernel anymore. The correspondingbluhm1-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@
2013-05-14Don't display swapin/swapout uvmexp fieldsmiod1-3/+1
2013-03-26i broke it. tailq is now simpleq in pool.tedu1-4/+4
found the hard way by otto.
2012-04-12remove rfork(); ok guenther miodderaadt2-7/+7
2010-11-19Make KERN_CPTIME return an avarage number of ticks across all CPUsmikeb1-9/+1
tedu agreed with an idea, tested by Luis Useche and me; ok deraadt
2010-09-24Now that HW_DISKNAMES returns xx0: or xx0:uid entries, we must truncatederaadt1-2/+13
the : and uid components out -- otherwise these two programs will work poorly.
2010-08-01remove unused variablechl1-2/+2
ok thib@
2010-07-22Remove the VM_KMPAGESFREE sysctl. After the pmemrangethib1-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@
2010-07-20Remove setresguid since it is no longer needed.lum2-28/+3
ok matthew@ millert@ deraadt@
2009-11-22don't repeat the banner if not a tty.tedu1-3/+8
add a -c count option to netstat. tweak spacing to not smear fields in vmstat. ok deraadt sthen
2009-10-27rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt1-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
2009-09-30Use guaranteed 64-bit arithmetic for the name lookup statistics andnaddy1-15/+13
zap the PCT() macro that was a holdover from before we had prototypes. ok gilles@, deraadt@
2008-10-08use (unsigned) in rate calculation for > 2 billion interrupts. This willderaadt1-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
2008-09-08"InUse" is much more interesting than "Releases" for pools. ok beck@otto1-4/+4
deraadt@ art@
2008-03-16use ellipsis to show that more than one disk is allowedsobrado1-3/+3
ok jmc@
2007-12-30minor improvement on the diff to r1.106sobrado1-3/+3
ok jsing@