summaryrefslogtreecommitdiff
path: root/bin/ps/keyword.c
AgeCommit message (Collapse)Author
2022-02-25A few additional changes related to the now 32 bit accounting flag.Rob Pierce
Pointers from and discussions with millert and deraadt. Ok millert@, deraadt@, bluhm@
2022-02-22Use sizeof() instead of KI_MAXCOMLEN and KI_WMESGLEN in structs.Todd C. Miller
This way we keep the size of the strings in the private struct in sync with what the kernel gives us. OK deraadt@
2022-02-22Instead of using MAXCOMLEN from sys/param.h, use KI_MAXCOMLEN as width,Theo de Raadt
from sysctl.h. This isn't a perfect transition, still thinking about other ways to do it. ok millert
2022-01-05Delete 'emul' keyword: it's been just returned 'native' for a long timePhilip Guenther
ok jsg@ deraadt@
2021-08-28/bin/ps: Implement reporting of supplemental groupsChristopher Zimmermann
with help from sthen@ and tim@. OK tim@
2019-06-23add "ps -o pledge" option, which prints a comma-seperated list of pledgesTheo de Raadt
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).
2019-06-23Export unveil state so that ps(8) can show it. Two new status flags,Theo de Raadt
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
2017-01-24do not need sys/proc.hTheo de Raadt
2016-09-08etime isn't just an alias for start. the output format is different.Ted Unangst
diff from Carlin Bingham. ok millert.
2015-12-30rename a few variables/functions to avoid shadowingTed Unangst
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-10-13Remove duplicate and misleading vcmp() prototype;Ingo Schwarze
patch from Martin <Natano at natano dot net>; ok deraadt
2014-03-20Move the "minflt" entry to the correct spot in the var array so that allLawrence Teo
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@
2013-10-24Fix field header overriding on fields that are (internally) aliases for others.Philip Guenther
Follow POSIX spec for the default headers for the comm, etime, and tty fields. Problem noted by lotheac (at) iki.fi ok deraadt@
2013-09-22Stop merging the per-thread and per-process flags when reportingPhilip Guenther
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@
2012-04-11Add maxrss keyword for the ru_maxrss value...which ariane@ is making workPhilip Guenthe
2012-04-04Add "tid" as a formatting keyword. If the -H option is specified, includeJoel Sing
the thread ID in the default format. ok deraadt@ sthen@
2012-01-07Add rtable id and thread id to struct kinfo_proc (and fix process id)Philip Guenthe
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@
2011-12-29Suppress the header line if all the field headers have been set to empty.Philip Guenthe
ok millert@
2011-12-11Make ps understand -o cwd using the new KERN_PROC_CWD sysctl. Some helpNicholas Marriott
and suggestions from guenther. ok guenther
2011-04-10Switch back from KERN_PROC2/kinfo_proc2 to KERN_PROC/kinfo_proc nowPhilip Guenthe
that we've got name we want for the API we want "ZAP!" deraadt@
2011-03-12Replace the old, broken KERN_PROC ABI and its matching functionsPhilip Guenthe
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
2010-02-14Avoid overflow and wraparound in memory fields by using unsignedPhilip Guenthe
long long arithmetic and formats. Use PTRWIDTH for the column size for various address fields. ok otto@ tedu@
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
2008-03-08Instead of calling donlist() in the format print routines, call itTodd C. Miller
a single time before we print anything, if needed. Uses a flag to specify which formats need the kernel info donlist() provides. OK deraadt@
2007-04-13Userland gets 7 chars of wchan, not 6; noticed by thib@Miod Vallat
ok mickey@ otto@
2006-11-29Do not test for processes being swapped out since this can't happen anymore.Miod Vallat
2006-10-16The session field is a pointer and so should be 8 chars forTodd C. Miller
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@
2006-05-02Format nicelevel relative NZERO as other tools do.Hugh Graham
Surely, says millert.
2004-09-14rename internal uname() to euname() to avoid libc conflictTheo de Raadt
2004-06-11export cpuid via kproc2, and make ps & top aware... from niklasTheo de Raadt
2004-01-08Convert to kinfo_proc2. The sort order for -u and -m will be differentTodd C. Miller
due to a bug fix in the sort routine.
2003-12-16typo; mjc@bitz.caTheo de Raadt
2003-06-25protosTheo de Raadt
2003-06-11ansification, art okTheo de Raadt
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2002-12-19add dsiz and ssiz to accompany tsiz; millert@ okMichael Shalayeff
2002-07-19Fix format bug with ps -o group. ok deraadt@Dale Rahn
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
1998-11-25null pointers are not your friendAaron Campbell
1997-11-06fix ps(1) LIM columnkstailey
1997-09-03add ps "emul" optionkstailey
1997-08-22XPG4 compatibility for format options:kstailey
two new options: group and rgroup. three new aliases: etime for start, comm for ucomm, and args for command.
1997-08-08Add a "parsed" flag for ps fields so we don't print the same fieldTodd C. Miller
multiple times. Fixes PR #298 from Carsten Hammer <chammer@vogon.party.de>
1997-08-04toast non-NEWVM code; freebsdTheo de Raadt
1997-07-23tabifykstailey
1997-06-18(foo *)NULL -> NULLkstailey
1997-02-12Stat field takes 5 chars not 4 (think "IW<s+")kstailey
1997-02-05Added "gid" keyword to print effective group ID of process.kstailey
(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)
1996-06-23update rcsidTheo de Raadt