summaryrefslogtreecommitdiff
path: root/usr.bin/vmstat
AgeCommit message (Collapse)Author
2021-07-12Change the error reporting pattern throughout the tree when unveilBob Beck
fails to report the path that the failure occured on. Suggested by deraadt@ after some tech discussion. Work done and verified by Ashton Fagg <ashton@fagg.id.au> ok deraadt@ semarie@ claudio@
2019-12-06replace links to uvm(9) to uvm_init(9); ok mpiJason McIntyre
2019-11-28ks_mapblocks is gonePhilip Guenther
2019-10-14pledge() won't work but we can use unveil() to reduce filesystem accessTheo de Raadt
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 changesTheo de Raadt
2019-08-12Add the CP_SPIN time to the sum of system time reported.Claudio Jeker
OK kettenis@
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
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 toKenneth R Westerback
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 userlandPhilip Guenther
While here, delete some extra #includes and apply style(9) sort rules. ok deraadt@ krw@ mpi@
2018-04-10typo: "anon's" -> "anons"Mike Larkin
ok jmc, krw, deraadt
2017-12-08remove description of 'at' field which was removed from vmstat.c -r1.21Jasper Lievisse Adriaanse
2017-05-30rename variable to avoid shadow. from Brian CallahanTed Unangst
2017-05-10There's no difference between short and long sleepers, so just printMartin Pieuchot
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 conversionTheo Buehler
ok deraadt, guenther, tedu
2016-08-14Convert %q to %ll and cast opaque system values to long long.Philip Guenther
Use uint64_t for the KERN_INTRCNT_CNT sysctl() ok krw@
2016-07-27increase the size of forkstat fields to accomodate large valuesTed Unangst
2016-03-30some Xr adjustment to catch up with MLINKS removal;Jason McIntyre
2015-12-24Replace bzero with memset. No binary change.mmcc
ok tb@
2015-04-18Convert many atoi() calls to strtonum(), adding range checks and failureTheo de Raadt
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.Ted Unangst
convert atoi to strtonum. ok deraadt
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
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.Ted Unangst
2014-11-23<sys/buf.h> isn't actually needed herePhilip Guenther
ok tedu@
2014-09-15Remove non-standard <sys/dkstat.h> header. It has not contained anythingMiod Vallat
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" deraadtOkan Demirmen
2014-07-13Display zero page hit and miss counters in vmstat -s.Mark Kettenis
ok deraadt@
2014-07-08decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hTheo de Raadt
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.135David Gwynne
2014-07-02info about pools is currently given to userland by copying eachDavid Gwynne
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 directlyMartin Pieuchot
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 ctypeTheo de Raadt
ok okan
2013-11-13remove unused variablesCharles Longeau
ok mikeb@ bluhm@
2013-10-31sometimes we find .h we no longer needTheo de Raadt
2013-10-08Obtain the uptime of the running system using the new CLOCK_UPTIME,Philip Guenther
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=2Philip Guenther
suggestions and ok millert@
2013-07-18There is no uvm_km_pages_free in our kernel anymore. The correspondingAlexander Bluhm
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 fieldsMiod Vallat
2013-03-26i broke it. tailq is now simpleq in pool.Ted Unangst
found the hard way by otto.
2012-04-12remove rfork(); ok guenther miodTheo de Raadt
2010-11-19Make KERN_CPTIME return an avarage number of ticks across all CPUsMike Belopuhov
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 truncateTheo de Raadt
the : and uid components out -- otherwise these two programs will work poorly.
2010-08-01remove unused variableCharles Longeau
ok thib@
2010-07-22Remove the VM_KMPAGESFREE sysctl. After the pmemrangeThordur I. Bjornsson
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.lum
ok matthew@ millert@ deraadt@
2009-11-22don't repeat the banner if not a tty.Ted Unangst
add a -c count option to netstat. tweak spacing to not smear fields in vmstat. ok deraadt sthen
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
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 andChristian Weisgerber
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 willTheo de Raadt
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@Otto Moerbeek
deraadt@ art@
2008-03-16use ellipsis to show that more than one disk is allowedIgor Sobrado
ok jmc@