Age | Commit message (Collapse) | Author | |
---|---|---|---|
2019-03-24 | detect -t argument being too long, rather than truncating | Theo de Raadt | |
2019-02-05 | Let ps(1) work in single user mode where /var/run does not exist. | Florian Obser | |
Give the same treatment if /dev doesn't exist. While things will be real interesting without /dev there is no reason to stop ps(1). Fix suggested by & OK deraadt OK millert | |||
2018-09-16 | Use uid_from_user(3) and gid_from_group(3) in utilities that | Todd C. Miller | |
do repeated lookups. OK tb@ | |||
2018-08-08 | unveil dev.db "r" for devname(), /dev "r", and in the non-sysctl case | Theo de Raadt | |
some kernel memory/symbol files. | |||
2016-09-23 | Attempt to use stdout, stderr, or stdin terminal widths if they exist. | Anthony J. Bentley | |
This behavior already existed but was unintentionally lost in revision 1.70 of ps.c. ok millert@ tb@ | |||
2016-03-17 | Switch (non-curses, non-ksh) programs that use COLUMNS to a single idiom. | Anthony J. Bentley | |
Previously behaviors were all over the map. This changes them to use COLUMNS first, and either terminal width or a hardcoded value (typically 80) as appropriate. ok deraadt@; man bits ok jmc@ | |||
2016-01-10 | UTF-8 support: | Ingo Schwarze | |
In a UTF-8 locale, columnate correctly and replace valid, but non- printable characters with the Unicode replacement character U+FFFD. No change in the C/POSIX locale, and no change for invalid bytes. Grand total, the code becomes shorter by almost 30 lines. Feedback from czarkoff@, OK millert@. | |||
2015-11-11 | fix pledge error message | Theo de Raadt | |
2015-10-25 | need "getpw" pledge; spotted by matthieu | Theo de Raadt | |
2015-10-23 | With new pledge "ps" and "vminfo" requests, ps/top/w become possible. | Theo de Raadt | |
2015-06-29 | After removing the p_swtime from the kernel, ps always printed 0.0 | Alexander Bluhm | |
as %cpu time. Remove the calculation in ps that includes the process lifetime. Just print the p_pctcpu value, that was done before when ps was called with -C. Keep -C as a no-op for existing scripts. OK millert@ | |||
2015-04-09 | kflag and wflag don't need to be counters; wflag only needs to know if | Okan Demirmen | |
greater than 0 for its one test case. ok deraadt | |||
2015-01-16 | Replace <sys/param.h> with <limits.h> and other less dirty headers where | Theo 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-07-08 | sys/user.h can now be substantially gutted. | Theo de Raadt | |
ok guenther | |||
2014-06-05 | Add support for COLUMNS env variable, inspired by FreeBSD but with a dash | Philip 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-07 | convert calloc to use reallocarray instead. ok millert | Ted Unangst | |
2013-11-21 | add unsigned char casts for specific calls to ctype.h macros. | Theo de Raadt | |
ok guenther step | |||
2013-10-31 | pull in less .h to do the same | Theo de Raadt | |
2013-10-28 | add -A (-ax) support; from Lauri Tirkkonen with some option sorting. | Okan Demirmen | |
ok guenther@ jmc@ | |||
2013-09-22 | Stop merging the per-thread and per-process flags when reporting | Philip 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-21 | Remove 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-17 | Make it optional for kvm_getprocs() (and related sysctl) to return | Paul 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-12 | Add 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-04 | Add "tid" as a formatting keyword. If the -H option is specified, include | Joel Sing | |
the thread ID in the default format. ok deraadt@ sthen@ | |||
2011-10-13 | Remove support for systems that lack CPUs. (i.e., stop looking up | Philip Guenthe | |
HW_NCPU when the only test was whether it's non-zero) ok millert@ | |||
2011-09-25 | Add -H option to show rthreads, hiding them by default | Philip Guenthe | |
Diff from uwe@ | |||
2011-04-10 | Switch back from KERN_PROC2/kinfo_proc2 to KERN_PROC/kinfo_proc now | Philip Guenthe | |
that we've got name we want for the API we want "ZAP!" deraadt@ | |||
2010-07-02 | ps uses libkvm, so it doesn't need its own copy of the "get process info | Philip Guenthe | |
via sysctl" logic. ok millert@ | |||
2009-10-28 | rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and | Theo 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-07-18 | remove unnessasary cast. | Kevin Lo | |
ok millert@ | |||
2008-03-08 | Instead of calling donlist() in the format print routines, call it | Todd 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-12-28 | printf field widths are always int, so add a cast to remove | Charles Longeau | |
"warning: field width is not type int" "looks good" otto@ | |||
2007-09-01 | malloc(n * m) -> calloc(n, m); from zinovik | Theo de Raadt | |
2006-11-01 | simplify synopsis and sync usage(); | Jason McIntyre | |
2006-04-25 | various small lint cleanups; ok otto | Theo de Raadt | |
2004-11-24 | on MP machines, in STAT field, add /# where # is the cpu number so that | Theo de Raadt | |
you can see processes move around; ok pval millert | |||
2004-09-14 | remove unused variable | Theo de Raadt | |
2004-02-24 | - `C' before `c' | Jason McIntyre | |
- replace `<' and `>' - sync usage() | |||
2004-02-08 | 'ps' should not act like 'ps a'. Resolves PR 3676. | Otto Moerbeek | |
ok tdeval@ millert@ | |||
2004-02-04 | (uid_t) -1 is a valid uid, so do not use it as a flag. | Otto Moerbeek | |
From Joris Vink <nimadeus at pandora dot be> with tweaks from me. ok tdeval@ hshoexer@ henning@ | |||
2004-01-08 | Convert to kinfo_proc2. The sort order for -u and -m will be different | Todd C. Miller | |
due to a bug fix in the sort routine. | |||
2003-07-29 | spacing | Theo de Raadt | |
2003-06-11 | ansification, art ok | Theo de Raadt | |
2003-06-02 | Remove the advertising clause in the UCB license which Berkeley | Todd C. Miller | |
rescinded 22 July 1999. Proofed by myself and Theo. | |||
2003-04-15 | mix of tdeval and my string cleaning | Theo de Raadt | |
2002-06-12 | unused variable | Artur Grabowski | |
2002-06-09 | Fix the start time on sysctl kvm. | Artur Grabowski | |
2002-06-08 | Use KVM_NO_FILES and remove the setgid. | Artur Grabowski | |
2002-04-06 | Fix a typo and sync usage() with man page; Brian Poole | Todd C. Miller | |
2002-02-16 | Part 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. |