summaryrefslogtreecommitdiff
path: root/bin/ps
AgeCommit message (Collapse)Author
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
2010-09-03add an EXIT STATUS section for /bin;Jason McIntyre
2010-07-02ps uses libkvm, so it doesn't need its own copy of the "get process infoPhilip Guenthe
via sysctl" logic. ok millert@
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
2009-02-08updates to IEEE Std 1003.1-2008;Jason McIntyre
2009-02-08bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a fewJason McIntyre
updates to follow;
2009-01-21Do not mention /dev/drum anymore, since we won't use it. With tweaks fromMiod Vallat
jmc@
2008-07-18remove unnessasary cast.Kevin Lo
ok millert@
2008-06-17better description of what ps without arguments does;Jason McIntyre
from Pierre Riteau ok otto
2008-03-24- extern.h is already included by ps.h, so zap it.Jasper Lievisse Adriaanse
from Jacek Masiulaniec, via ray@ ok ray@
2008-03-17better .Nd; from Pierre RiteauJason McIntyre
ok sobrado
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@
2008-02-10Use HW_PHYSMEM64.Mark Kettenis
ok krw@
2007-12-28printf field widths are always int, so add a cast to removeCharles Longeau
"warning: field width is not type int" "looks good" otto@
2007-11-06fix format stringCharles Longeau
ok ray@ gilles@
2007-09-01malloc(n * m) -> calloc(n, m); from zinovikTheo de Raadt
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-29- consistent STANDARDS blurbJason McIntyre
- note which options are extensions to POSIX discussed w/ deraadt otto millert
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-11-02overhaul the keywords section;Jason McIntyre
2006-11-01-.Xr sh 1 ,Jason McIntyre
2006-11-01some minor adjustments to the options list;Jason McIntyre
2006-11-01+.Ex -std psJason McIntyre
2006-11-01- no need for double markupJason McIntyre
- prefer .Sq for single letters
2006-11-01give FILES a bit of space;Jason McIntyre
2006-11-01note that -L may not be specified with other options;Jason McIntyre