summaryrefslogtreecommitdiff
path: root/usr.sbin/pstat
AgeCommit message (Collapse)Author
2015-08-28Rework the UNIX domain socket garbage collector, including ideas fromPhilip Guenther
{Free,Net}BSD - when a socket is closed with fds in its input, defer closing them to a task to avoid recursing. This eliminates the complicated extra reference taking which had a 37 line(!) comment explanation - move flags, counts, and links only needed for this from struct file to struct unpcb - document the flow of the mark/sweep collector much help from claudio@ who made me explain the GC to him until we trusted it ok claudio@ mpi@ deraadt@
2015-03-11Remove setgid kmem support. As a result, -d and -v will require you toTheo de Raadt
run this as root. ok millert, also discussed with guenther
2015-02-10Fix -d output of smaller than 64 bit values on big-endian systems.Miod Vallat
ok mpi@ tedu@
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-19don't print vnodes if we didn't read themTed Unangst
2014-12-191. -T (totalflag) requires nlist too.Ted Unangst
2. If we can't read a vnode, there's no way LIST_NEXT is going to be meaningful. 3. set numvnodes before looping in case we return early. getting better, but still not all fixed
2014-11-23<sys/buf.h> isn't actually needed herePhilip Guenther
ok tedu@
2014-11-19delete the KERN_VNODE sysctl. it fails to provide any isolation from theTed Unangst
kernel struct vnode defintion, and the only consumer (pstat) still needs kvm to read much of the required information. no great loss to always use kvm until there's a better replacement interface. ok deraadt millert uebayasi
2014-10-08use reallocarray(NULL, a, b) instead of malloc(a*b)Theo de Raadt
ok doug
2014-10-01Do not mention sliplogin(8) and sl(4).Martin Pieuchot
2014-08-20Remove userland bits related to the crypto(4) interface; ok deraadtMike Belopuhov
2014-07-16zap trailing newlines; "go for it" deraadtOkan Demirmen
2014-03-19Pull in FreeBSD r37363 and r37887:Philip Guenther
-- Sync timestamp changes for inodes of special files to disk as late as possible (when the inode is reclaimed). Temporarily only do this if option UFS_LAZYMOD configured and softupdates aren't enabled. UFS_LAZYMOD is intentionally left out of /sys/conf/options. This is mainly to avoid almost useless disk i/o on battery powered machines. It's silly to write to disk (on the next sync or when the inode becomes inactive) just because someone hit a key or something wrote to the screen or /dev/null. -- Made lazy syncing of timestamps for special files non-optional. -- Also, include support in 'pstat -v' to display the IN_LAZYMOD flag. ok tedu@ millert@
2014-02-16fix bibliographical references; from Jan Stary <hans at stare dot cz>Ingo Schwarze
feedback and ok jmc@
2013-12-01Change 'mountlist' from CIRCLEQ to TAILQ. Be paranoid andKenneth R Westerback
use TAILQ_*_SAFE more than might be needed. Bulk ports build by sthen@ showed nobody sticking their fingers so deep into the kernel. Feedback and suggestions from millert@. ok jsing@
2013-11-12ensure there are prototypesTheo de Raadt
2013-10-22- add UNIX-domain socket info to struct kinfo_file2Philip Guenther
- convert netstat from kvm_getfiles() to kvm_getfile2() using that - delete kvm_getfiles() and KERN_FILE as no longer used (bump libkvm's major) - rename kvm_getfile2() to kvm_getfiles(), kinfo_file2 to kinfo_file and KERN_FILE2 to KERN_FILE. ok deraadt@, millert@ ports scan sthen@
2013-08-22Correct format string mismatches turned up by -Wformat=2Philip Guenther
suggestions and ok millert@
2013-06-05Move FHASLOCK from f_flag to f_iflags, freeing up a bit for passingPhilip Guenther
O_* flags and eliminating an XXX comment. ok matthew@ deraadt@
2013-04-21Tweak #include order to work during the big time_t transitionPhilip Guenther
noted by matthieu@
2013-03-24Do not leak kernel pointers, unless operating as root. Some other displayTheo de Raadt
functionality is lost, but one can argue that privacy was being violated there... ok various, including bluhm and guenther
2013-01-17some simple macro fixes;Jason McIntyre
2012-12-18We no longer use struct eproc for kinfo_proc in sysctl.h so thereTodd C. Miller
is no direct need for sys/proc.h or sys/resource.h. Some consumers of kinfo_proc need these for the proc flags and rlimit defines like RLIM_INF so add the appropriate includes to them. OK deraadt@ sthen@
2012-07-11Don't skip pipe, kqueue, crypto, or systrace files in pstat -f outputPhilip Guenthe
Also, cast to long to make printf formatting portable with help from matthew; ok deraadt@
2012-07-09According to miod, KERNBASE used as a userland symbol should dieTheo de Raadt
in a fire. Start by removing the definitions, before we clean the headers later.
2012-05-17show the f_iflags; ok guentherTheo de Raadt
2011-06-28Use kvm_getfile2() instead of sysctl(KERN_FILE) for the -f optionPhilip Guenthe
Make -T behave as documented: only report totals Only open the kvm files when necessary prompted by a comment from matthew@ ok and corrections millert@, ok tedu@
2010-09-19more wacky macro fixing;Jason McIntyre
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-10-23argument to -M is "core", not "corefile" (this typo was introducedIgor Sobrado
in 4.4BSD at least). ok jmc@
2009-05-31Don't define NFS before including kernel header files,Thordur I. Bjornsson
besides it being gnarly its useless since no magic is done if it is define. pointed out by deraadt@
2008-10-07pstat can hide information too; also based on PR 5113Theo de Raadt
2008-09-01sync synopsis and usage; KNF.Igor Sobrado
2008-05-09some Xr for tcpbench(1) and tcpdrop(8);Jason McIntyre
2008-02-20set globalnl to vnodenl in filemode() so we access the rightThordur I. Bjornsson
thing in the KGET() macros. Fixes a segfault when pstat is called with '-vT'; ok miod@,krw@,beck@
2007-12-28printf field widths are always int, so add casts to removeCharles Longeau
"warning: field width is not type int" "looks good" otto@
2007-12-08no need to pre-check for % in dformat, it will fail later anywaysTheo de Raadt
2007-12-04show some -d examples; ok jmcTheo de Raadt
2007-11-28- bring back a tweak that got reverted in previousJason McIntyre
- Xr printf 3 whilst here
2007-11-28refine format string, support hh and c for real. ok deraadtTed Unangst
2007-11-28Be more careful with printf-style formats, and fix a few other nigglesTheo de Raadt
ok tedu
2007-11-28tweak previous;Jason McIntyre
2007-11-28add a -d argument, which can be used to peek at values in the kernel.Ted Unangst
this is easier than using the ddb console. ok deraadt
2007-11-26cleanup. nl is a poor name for a global (accessed via macro no less).Ted Unangst
also, man page says nlist ends with NULL name, not "". ok art bob deraadt
2007-09-03malloc(n * m) -> calloc(n, m); ok espieTheo de Raadt
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgTheo de Raadt
2007-05-31convert to new .Dd format;Jason McIntyre
2006-09-21more lfs removal; ok pedroJason McIntyre
2006-08-04Remove reference to tb(4). Found by jmc@, thanks.Marc Balmer
2006-06-07mention the nmea line discipline in the pstat(8) man page.Marc Balmer
found by mk, ok deraadt