summaryrefslogtreecommitdiffstats
path: root/bin/ps
Commit message (Collapse)AuthorAgeFilesLines
...
* Minor style fixes, mostly adding indent-protection on some comment-blocks.gad2004-03-301-6/+6
| | | | | Noticed by: bde MFC after: 1 week
* Replace pscomp() with a cleaner version, mostly written by bde (*).gad2004-03-301-14/+43
| | | | | | | | | | | This corrects a problem of lost-precision for `-r' (sort-by-CPU). Also, for sort-by-CPU and sort-by-memory, any processes which have the same value CPU or MEMORY are now sorted by TTY and then (if needed) by pid. (* - I just added the NODEV checks, after doing some testing of my own) Submitted by: bde MFC after: 1 week
* Oops. Remove some ';'s in #defines added by a previous update.gad2004-03-291-2/+2
| | | | Noticed by: bde
* Have this source explicitly include <sys/proc.h>, since it referencesgad2004-03-291-0/+1
| | | | | | | values such as P_CONTROLT and PS_INMEM. But this still won't define PID_MAX for us, since that is hidden inside of '#ifdef _KERNEL'. Noticed by: bde
* Since "kp" is a pointer, I should be comparing against NULL not 0.gad2004-03-291-1/+1
| | | | Noticed by: bde
* Various style improvements, mostly in comments and indentation.gad2004-03-291-43/+58
| | | | Suggested by: bde (well, for most of them)
* In the routines I've been working on, sort the variable declartionsgad2004-03-291-9/+9
| | | | | | so that non-pointers are listed after pointer-type variables. Noticed by: bde
* Split two 'fmt' strings so they're easier to read on 80-char windows.gad2004-03-291-2/+4
|
* Sort the declarations of global variables.gad2004-03-291-24/+25
|
* Sort the routine prototypes.gad2004-03-281-10/+9
|
* If <x> is a process id that does not exist, then just print the headergad2004-03-281-1/+1
| | | | | | | (if any) and exit, thus matching the behavior on -stable and other OS's. My earlier attempt to fix this (v1.65) only seemed to work because of a lucky random value in nentries (which was not being initialized back when I tested that earlier patch).
* Fix `-o rtprio' so it prints the correct value.gad2004-03-281-2/+2
| | | | | | PR: bin/59417 Submitted by: Jan Willem Knopper This fix by: bde (in the audit-trail of the PR)
* If a non-existent user is given as part of `-U userlist', treat it asgad2004-03-271-11/+6
| | | | | a fatal error instead of a minor warning. It is possible that a few users are used to the previous behavior, but I'm claiming it was a bug.
* Explicitly wrap two long-ish linesi of code, to make them easier to read.gad2004-03-271-2/+4
|
* Change the #if-ish logic which is used to add the `-f' option when `ps'gad2004-03-271-9/+9
| | | | | | is compiled with LAZY_PS, so that there is only one PS_ARGS string to modify when changing the option-list. Also get `-f' to show up in the usage() statement when compiled with LAZY_PS.
* Move the 'f' case so it shows up in the right place, alphabetically.gad2004-03-271-6/+6
|
* Update the date on the man page, since this the previous change addedgad2004-03-271-1/+1
| | | | a few new options.
* Support more POSIX/SUSv3 options:gad2004-03-272-187/+580
| | | | | | | | | | | | | | | | | | | | | | - Change `-p' to allow a list of process IDs, and `-t' to allow a list of terminal names, instead of only a single value for each. - Add the `-A' option of SUSv3, which is exactly the same as `-ax'. - Add the `-G gidlist' (group id). - Allow any of these "selector options" to be specified multiple times, and have `ps' keep adding to a given list -- instead of replacing the previously-specified values. - Fix interactions between selector-options, so that: "If any are specified, ... ps shall select the processes represented by the inclusive OR of all the selection-criteria options." (from SUSv3) - Add a `-X' option, which is the reverse of the `-x' option. - various minor improvements in parsing and error handling. This does not get us to match POSIX/SUSv3, but it gets us closer. The `-g pgidlist', `-R ruserlist' and `-s sidlist' options mentioned in freebsd-standards are still under debate, so they skipped for now. It should be true that this introduces no user-visible incompatible changes, except to support "new stuff" that was not supported before.
* Avoid the manpage layering violation and low-level implementationru2004-03-261-3/+2
| | | | | details of libkvm, and just tell what the getbootfile(3) function will return, by using the text from netstat(1) and dmesg(8).
* - Remove references to /dev/kmem -- ps(1) utilizes theru2004-03-261-11/+5
| | | | | | | sysctl(3) interface in kvm(3). - Document the correct default when no -N is specified. - Remove stale reference to /var/db/kvm_kernel.db. - Remove stale reference to /var/run/dev.db.
* Document incorrect handling of multibyte characters.tjr2004-03-211-1/+6
|
* Fix 'ps -p proclist' and 'ps -u userlist' so the command returns non-zerogad2004-03-181-3/+13
| | | | | | | | if no processes were matched. Also sorts the list of 'int's in main, as long as I had to add another one... Noticed by: Nate Lawson MFC after: 10 days
* Improvements to 'ps -p <x>'. If <x> is a process id that does not exist, thengad2004-03-172-21/+104
| | | | | | | | | | | just print the header (if any) and exit, thus matching the behavior on -stable and other OS's. Also adds support for <x> being a comma-separated list of processes, and does a much better checking for invalid-values of <x>, such as 'ps -p someword'. Reviewed by: mentioned on freebsd-current MFC after: 10 days
* style.Makefile:johan2004-02-231-1/+1
| | | | Use WARNS?= instead of WARNS=
* Allow the -H option to show threads when selecting by uid, tty,deischen2004-02-221-8/+6
| | | | and pid.
* MFp4 @46705:jmallett2004-02-081-0/+2
| | | | | | | Support "uprocp" exactly like "paddr" with the former having been documented in the manual but not implemented. PR: 42484
* Bring ps.1 up to date with changes in the past seven years:cperciva2004-01-211-33/+22
| | | | | | | | | | * Remove mention of '>', 'A', and 'S' states * Mention 'W' state. * List 'J' state in the correct location. * Sync with flags in sys/proc.h Approved by: rwatson (mentor) MFC after: 7 days
* mdoc(7): Use the new feature of the .In macro.ru2003-09-081-1/+1
|
* Implement the nwchan keyword that has been in the man page, but washarti2003-08-133-0/+15
| | | | | not implemented. This is just handy if you want to ddb the address some process is waiting on.
* Clarify that the 'state' information consists of characters, notbrueffer2003-08-051-2/+2
| | | | | | | | only letters (e.g. IWs+) PR: 55221 Submitted by: Rich Morin <rdm@cfcl.com> MFC after: 3 days
* Get this area compiling with the highest WARNS= that it works with.markm2003-06-131-2/+1
| | | | | | | Obsolete WFORMAT= junk also removed where possible. OK'ed by: obrien Tested on: sparc64, alpha, i386
* Add the -H option to ps(1) to display all kernel visible threads in eachscottl2003-06-122-6/+19
| | | | | process. The default behavior of showing only the process is retained as the default.
* add section name to .Xrcharnier2003-06-081-1/+1
|
* Fix long constant usage for i386.markm2003-05-031-1/+1
| | | | Tested by: Joe Marcus Clarke <marcus@marcuscom.com>
* Fix a bazillion warnings. This makes almost the whole of src/bin/*markm2003-05-031-1/+1
| | | | | | WARNS=6, std=c99 clean. Tested on: i386, alpha
* fmt.c has a comparison between signed and unsigned that is unclear howobrien2003-05-021-0/+1
| | | | to properly fix.
* Fix references to non-existing or obsoleted man pages.schweikh2003-04-301-3/+1
| | | | | PR: docs/51480 (only a small part) Submitted by: Diomidis D. Spinellis <dds@aueb.gr>
* Revert the zombie part of previous commitcharnier2003-04-151-1/+1
|
* Correct style bugs. Don't skip zombies in cputime(), according to Bruce,charnier2003-04-141-58/+42
| | | | | | zombie CPU times are valid. Adjust array size in strftime(3). Submitted by: Bruce
* Display residency and sleep times (re and sl fields) larger than 127 as 127.tjr2003-04-123-3/+6
| | | | | | | This is what the manual page says ps should do, and what OpenBSD and NetBSD do. Based on a patch from Ken Stailey. PR: 27433, 46232
* Fix slight disorder that broke sorting. Put in bold warning about thesobomax2003-02-051-2/+3
| | | | | | fact that in this case order matters. Submitted by: Peter Edwards <pmedwards@eircom.net>
* Display elapsed time (-o etime) using [[dd-]hh:]mm:ss, which according tocharnier2003-02-055-4/+24
| | | | | | Solaris man page is the POSIX way. Reviewed by: jmallett
* Per-variable\ entry headers, to allow the 'ps -otime -otime=FOO' or similarjmallett2003-01-194-11/+19
| | | | | case to do the right thing and affect exactly one column. This is consistent with GNU ps(1) in BSD mode, and POLA.
* When inserting a non-user-specified (e.g. not via -o or -O) format, don't dupejmallett2003-01-193-16/+39
| | | | | | | | one that is already there. This is consistent with GNU ps(1)'s BSD mode, and POLA. Reported by: Andy Farkas <andyf@speednet.com.au> Tested by: Andy Farkas <andyf@speednet.com.au>
* Refer to the process label as proclabel, as there is a function called label,jmallett2003-01-181-10/+10
| | | | and that's what these locals were called before.
* Fixed the abuses of .Ql visible on stderr in troff mode.ru2002-12-231-1/+1
| | | | PR: docs/37176
* The hw.availpages sysctl has an unsigned long value now, fix the retrievaltmm2002-11-012-2/+3
| | | | to match that.
* Do not print a header line if it would be empty; required by 1003.1-2001.tjr2002-10-311-0/+9
|
* Use the MAC interface to list process MAC labels rather than usingrwatson2002-10-248-172/+58
| | | | | | | | | | the LOMAC-specific interface (which is being deprecated). The revised LOMAC using the MAC framework will export levels listable using this mechanism. Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Oops, the previous version was a last minute test version with off_tbde2002-10-031-1/+1
| | | | | | replaced by int instead of size_t. Spotted by: fanf
OpenPOWER on IntegriCloud