summaryrefslogtreecommitdiffstats
path: root/bin/ps/keyword.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* add "ps -o pledge" option, which prints a comma-seperated list of pledgesderaadt2019-06-231-1/+2
| | | | | | | | | active on each process. So go forth and "ps agux -o pledge" to find pledges which can be improved. (I hesitated adding this before because I am afraid of people enforcing extra-strict pledge in programs without testing all the use cases -- thereby breaking software).
* Export unveil state so that ps(8) can show it. Two new status flags,deraadt2019-06-231-2/+2
| | | | | | | | you'll see one, or neither. 'u' - process installed unveils, but not yet locked with unveil(0,0) or pledge w/o "unveil" 'U' - process has installed unveils, and locked. ok rob
* do not need sys/proc.hderaadt2017-01-241-2/+1
|
* etime isn't just an alias for start. the output format is different.tedu2016-09-081-2/+2
| | | | diff from Carlin Bingham. ok millert.
* rename a few variables/functions to avoid shadowingtedu2015-12-301-2/+2
|
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-3/+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)
* Remove duplicate and misleading vcmp() prototype;schwarze2014-10-131-2/+1
| | | | | patch from Martin <Natano at natano dot net>; ok deraadt
* Move the "minflt" entry to the correct spot in the var array so that alllteo2014-03-201-2/+2
| | | | | | | | | | | keywords are sorted in ascending order again. This fixes a bug where ps(1) thought that "minflt" was an invalid keyword. This bug was introduced when the "maxrss" keyword was accidentally added to the array after "minflt" instead of before, so the bsearch(3)-based keyword lookup could never find "minflt". ok deraadt@ guenther@ millert@ tedu@
* Fix field header overriding on fields that are (internally) aliases for others.guenther2013-10-241-9/+8
| | | | | | | Follow POSIX spec for the default headers for the comm, etime, and tty fields. Problem noted by lotheac (at) iki.fi ok deraadt@
* Stop merging the per-thread and per-process flags when reportingguenther2013-09-221-1/+3
| | | | | | | | them via sysctl(KERN_PROC). In struct kinfo_proc the per-process flags move to p_psflags, leaving the per-thread flags in p_flags. Flag descriptions in ps(1) updated to be less obtuse. discussed with matthew@ some time ago; ok jca@, manpage bits ok jmc@
* Add maxrss keyword for the ru_maxrss value...which ariane@ is making workguenther2012-04-111-1/+2
|
* Add "tid" as a formatting keyword. If the -H option is specified, includejsing2012-04-041-1/+7
| | | | | | the thread ID in the default format. ok deraadt@ sthen@
* Add rtable id and thread id to struct kinfo_proc (and fix process id)guenther2012-01-071-1/+2
| | | | | | | | | | | and add an 'rtableid' keyword to ps. Add rtable id, thread id, and socket splice info to struct kinfo_file2 and make fstat display socket splice information. Remove old KVM_PROC2 and kinfo_proc2 interfaces; bump libkvm major Socket splice info and corrections from bluhm@ "Lovely" deraadt@
* Suppress the header line if all the field headers have been set to empty.guenther2011-12-291-1/+4
| | | | ok millert@
* Make ps understand -o cwd using the new KERN_PROC_CWD sysctl. Some helpnicm2011-12-111-1/+3
| | | | | | and suggestions from guenther. ok guenther
* Switch back from KERN_PROC2/kinfo_proc2 to KERN_PROC/kinfo_proc nowguenther2011-04-101-3/+3
| | | | | | that we've got name we want for the API we want "ZAP!" deraadt@
* Replace the old, broken KERN_PROC ABI and its matching functionsguenther2011-03-121-3/+3
| | | | | | | | | in libkvm with the stable-ABI versions that are currently named KERN_PROC2, kvm_get{proc,argv,envv}2(). The latter names and symbols will continue to be supported for a few releases. Committing now that they ports people have had a couple releases to update pkgs that usd the old functions
* Avoid overflow and wraparound in memory fields by using unsignedguenther2010-02-141-5/+5
| | | | | | | long long arithmetic and formats. Use PTRWIDTH for the column size for various address fields. ok otto@ tedu@
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-9/+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
* Instead of calling donlist() in the format print routines, call itmillert2008-03-081-5/+5
| | | | | | a single time before we print anything, if needed. Uses a flag to specify which formats need the kernel info donlist() provides. OK deraadt@
* Userland gets 7 chars of wchan, not 6; noticed by thib@miod2007-04-131-4/+4
| | | | ok mickey@ otto@
* Do not test for processes being swapped out since this can't happen anymore.miod2006-11-291-3/+2
|
* The session field is a pointer and so should be 8 chars formillert2006-10-161-5/+5
| | | | | | 32-bit CPUs and 16 chars for 64-bit ones. Also, left-justify the state field name to match the justification of the state data. OK jmc@
* Format nicelevel relative NZERO as other tools do.hugh2006-05-021-3/+3
| | | | Surely, says millert.
* rename internal uname() to euname() to avoid libc conflictderaadt2004-09-141-3/+3
|
* export cpuid via kproc2, and make ps & top aware... from niklasderaadt2004-06-111-2/+3
|
* Convert to kinfo_proc2. The sort order for -u and -m will be differentmillert2004-01-081-47/+45
| | | | due to a bug fix in the sort routine.
* typo; mjc@bitz.caderaadt2003-12-161-3/+3
|
* protosderaadt2003-06-251-3/+3
|
* ansification, art okderaadt2003-06-111-9/+6
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-7/+3
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* add dsiz and ssiz to accompany tsiz; millert@ okmickey2002-12-191-2/+4
|
* Fix format bug with ps -o group. ok deraadt@drahn2002-07-191-3/+3
|
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-4/+4
|
* null pointers are not your friendaaron1998-11-251-2/+4
|
* fix ps(1) LIM columnkstailey1997-11-061-3/+3
|
* add ps "emul" optionkstailey1997-09-031-2/+3
|
* XPG4 compatibility for format options:kstailey1997-08-221-2/+7
| | | | | two new options: group and rgroup. three new aliases: etime for start, comm for ucomm, and args for command.
* Add a "parsed" flag for ps fields so we don't print the same fieldmillert1997-08-081-37/+38
| | | | multiple times. Fixes PR #298 from Carsten Hammer <chammer@vogon.party.de>
* toast non-NEWVM code; freebsdderaadt1997-08-041-97/+2
|
* tabifykstailey1997-07-231-4/+4
|
* (foo *)NULL -> NULLkstailey1997-06-181-4/+4
|
* Stat field takes 5 chars not 4 (think "IW<s+")kstailey1997-02-121-3/+3
|
* Added "gid" keyword to print effective group ID of process.kstailey1997-02-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | (also alpha-sorted some of the man page that was nearly sorted.) BEFORE: kstailey@hermes$ ps -o ruid,svuid,uid,command RUID SVUID UID COMMAND 333 333 333 -bash (bash) worked, but group equivalent failed: kstailey@hermes$ ps -o rgid,svgid,gid,command ps: gid: keyword not found RGID SVGID COMMAND 20 20 -bash (bash) AFTER: kstailey@hermes$ ps -o rgid,svgid,gid,command RGID SVGID GID COMMAND 20 20 20 -bash (bash)
* update rcsidderaadt1996-06-231-1/+2
|
* in findvar() return NULL for keywords not foundderaadt1996-06-101-2/+3
|
* initial import of NetBSD treederaadt1995-10-181-0/+368