summaryrefslogtreecommitdiff
path: root/bin/ps
AgeCommit message (Collapse)Author
2014-10-13Remove duplicate and misleading vcmp() prototype;Ingo Schwarze
patch from Martin <Natano at natano dot net>; ok deraadt
2014-08-16reduce cutoff for "hours only" start times to reduce window of ambiguity.Ted Unangst
ok deraadt
2014-07-16zap trailing newlines; "go for it" deraadtOkan Demirmen
2014-07-13Update procflags list, add PS_SYSTEM, PS_EMBRYO, PS_ZOMBIE andClaudio Jeker
PS_NOBROADCASTKILL. The resulting table is shifted so far right that a few additional lines had to be wrapped. Not ideal but the best we can do at the moment.
2014-07-08sys/user.h can now be substantially gutted.Theo de Raadt
ok guenther
2014-07-04Track whether a process is a zombie or not yet fully built via flagsPhilip Guenther
PS_{ZOMBIE,EMBRYO} on the process instead of peeking into the process's thread data. This eliminates the need for the thread-level SDEAD state. Change kvm_getprocs() (both the sysctl() and kvm backends) to report the "most active" scheduler state for the process's threads. tweaks kettenis@ feedback and ok matthew@
2014-06-12somehow i missed -vW as extensions;Jason McIntyre
From: Martin Natano
2014-06-05Add support for COLUMNS env variable, inspired by FreeBSD but with a dashPhilip Guenther
of strtonum() from millert@ sprinkled on top. Also, we've always supported TZ for formatting dates, so say so. ok jmc@ millert@
2014-05-21document which keywords are posix conformant;Jason McIntyre
ok guenther sobrado
2014-05-17better description for -A and -a, with help from millert;Jason McIntyre
ok millert sobrado guenther
2014-05-16more STANDARDS fleshing; ok sobrado millertJason McIntyre
2014-05-15more for STANDARDS: unsupported lists (noted by guenther) and env vars;Jason McIntyre
2014-05-15flesh out STANDARDS; ok guentherJason McIntyre
2014-05-07convert calloc to use reallocarray instead. ok millertTed Unangst
2014-05-06spell NULL as NULLTed Unangst
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@
2014-01-21obvious .Pa fixes; found with mandocdb(8)Ingo Schwarze
2014-01-20P_NOZOMBIE and P_STOPPED are PS_* process flags nowPhilip Guenther
2013-12-27Document the P_SUSPSINGLE flag bitPhilip Guenther
2013-11-21add unsigned char casts for specific calls to ctype.h macros.Theo de Raadt
ok guenther step
2013-11-11remove totally excessive set of #includeTheo de Raadt
2013-10-31pull in less .h to do the sameTheo de Raadt
2013-10-28add -A (-ax) support; from Lauri Tirkkonen with some option sorting.Okan Demirmen
ok guenther@ jmc@
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-10-08Fix delivery of SIGPROF and SIGVTALRM to threaded processes by havingPhilip Guenther
hardclock() set a flag on the running thread and force AST processing, and then have the thread signal itself from userret(). idea and flag names from FreeBSD ok jsing@
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@
2013-03-23wchan is no longer exposed, just check if wmesg is not empty.Ted Unangst
(wmesg hasn't itself been a pointer since conversion to kinfo_proc.) noticed by sthen. ok deraadt jsing millert sthen
2012-08-02Apply profiling to all threads instead of just the thread that calledPhilip Guenthe
profil() by moving P_PROFIL from proc->p_flag to process->ps_flags with matching adjustment in fork1() and exit1() ok matthew@
2012-07-10Accounting for page tables, USPACE, and whatever else... as partTheo de Raadt
of the per-process %mem is not going to happen. In particular, we want USPACE to be removed from param.h
2012-04-21Remove a check made superfluous by the KERN_PROC_SHOW_THREADS flag.Philip Guenthe
This lets new binaries work (at least w/o the -H option) with old kernels. ok pirofti@ deraadt@
2012-04-17Make it optional for kvm_getprocs() (and related sysctl) to returnPaul Irofti
thread information. Add a KERN_PROC_SHOW_THREADS flag that has to be set in order to get the thread info and make it off by default. This creates backwards compatibility for applications that relied on a given size/number of items to be returned. Modify ps(1) and top(1) accordingly. Okay guenther@.
2012-04-12Add per thread accounting, mainly for usage & friends.Paul Irofti
This expands the already bloated FILL_KPROC macro to take an extra parameter that indicates if the callee is a thread or a process. The userland bits are adjusted accordingly and ps(1) and top(1) now display per thread usage times when -H is used. Also pkill(1) had to be adjusted so that duplicates don't pop up. libkvm does basically the same thing as the kernel bits. Okay guenther@.
2012-04-12Add maxrss keyword for the ru_maxrss value...which ariane@ is making workPhilip Guenthe
(missed commit pointed out by 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-16-H is an extension to posix;Jason McIntyre
2011-12-11Make ps understand -o cwd using the new KERN_PROC_CWD sysctl. Some helpNicholas Marriott
and suggestions from guenther. ok guenther
2011-10-13Remove support for systems that lack CPUs. (i.e., stop looking upPhilip Guenthe
HW_NCPU when the only test was whether it's non-zero) ok millert@
2011-10-03list the fields in the default display in the order of display;Jason McIntyre
from Alexander Best
2011-09-25Restore correct display of the 'V' flag on the parent in vfork()Philip Guenthe
2011-09-25Add -H option to show rthreads, hiding them by defaultPhilip Guenthe
Diff from uwe@
2011-07-06Remove mention of P_BIGLOCK.Artur Grabowski
2011-07-05Recommit the reverted sigacts change now that the NFS use-after-freePhilip Guenthe
problem has been tracked down. This fixes the sharing of the signal handling state: shared bits go in sigacts, per-rthread bits goes in struct proc. ok deraadt@
2011-04-18Revert the sigacts diff: NFS can apparently retain pointers to processesPhilip Guenthe
until they're zombies and then send them signals (for intr mounts). Until that is untangled, the sigacts change is unsafe. sthen@ was the victim for this one
2011-04-15Correct the sharing of the signal handling state: stuff that shouldPhilip Guenthe
be shared (p_sigignore, p_sigcatch, P_NOCLDSTOP, P_NOCLDWAIT) moves to struct sigacts, wihle stuff that should be per rthread (ps_oldmask, SAS_OLDMASK, ps_sigstk) moves to struct proc. Treat the coredumping state bits (ps_sig, ps_code, ps_type, ps_sigval) as per-rthread until our locking around coredumping is better. Oh, and remove the old SunOS-compat ps_usertramp member. "I like the sound of this" tedu@
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-04-03Update the description of the 'flags' keyword, including the known values,Philip Guenthe
aligning the table for easier reading. ok ariane@, millert@, 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