summaryrefslogtreecommitdiffstats
path: root/bin/ps
Commit message (Collapse)AuthorAgeFilesLines
...
* Additional tiny adjustment to kludge-option processing so `ps t p0'gad2004-06-011-6/+7
| | | | | | | | is treated like `ps -t p0', instead of changing it to `ps -T p0'. Note that `ps t' is still changed to `ps -T', since that is one of the main reasons for this kludge processing... Noticed by: Jilles Tjoelker on freebsd-arch
* Rewrite the kludge-option processing to improve how it handles a fewgad2004-06-011-62/+91
| | | | | | | | | | | | | | | | | | | | more special situations. This is the code which process `ps blah', when "blah" does not include a leading '-'. This change also removes a long-undocumented BACKWARD_COMPATIBILITY compile-time option, where: ps -options arg1 arg2 (with no '-' on "arg1" and "arg2") was treated as: ps -options -N arg1 -M arg2 This also changes `ps' to check for any additional arguments after processing all the '-'-options, and attempt to use those arguments as a pid or pidlist. If an extra argument is not a valid pidlist, then `ps' will print an error and exit. This seems a more generally useful extension of the kludge-option processing than the -N/-M behavior, and has fewer confusing side-effects. Reviewed by: freebsd-arch
* Add pgrep(1) and pkill(1) to the cross-reference section of ps(1).gad2004-05-251-0/+2
|
* Add the 'sid' info to the output of `ps -j', to make up for the 'sess'gad2004-05-232-2/+2
| | | | | | | (session-pointer) info which was dropped from `ps' earlier in 5.x. PR: bin/59423 Submitted by: Jilles Tjoelker
* Fix the kludge-old-options processing so `ps tpt' will be treated thegad2004-05-231-4/+5
| | | | | | | | same as `ps -tpt', instead of being changed into `ps -tpT'. PR: bin/52489 Submitted by: Jilles Tjoelker MFC after: 1 week
* Change `ps' to use the KERN_PROC_RGID and KERN_PROC_SESSION optionsgad2004-05-221-8/+5
| | | | | | | | (if trying to match only one real-group or one session-id), now that those options are implemented in src/sys/kern/kern_proc.c (v1.203). PR: bin/65803 (a very tiny piece of the PR) Submitted by: Cyrille Lefevre
* Assorted markup fixes.ru2004-05-161-209/+227
|
* Remove clause 3 from the UCB licenses.markm2004-04-068-32/+0
| | | | OK'ed by: imp, core
* Drop the include of <stdint.h>, since r1.84 removed references of intmax_t.gad2004-04-041-1/+0
|
* Add back the `-e' option, which was mistakenly dropped when cleaninggad2004-04-041-1/+1
| | | | | up the PS_ARGS string in revision 1.69 (and which was apparently not missed by anyone...).
* Give a name of 'l' (list) to the union in struct listinfo. This isgad2004-04-041-28/+30
| | | | | because some compilers (such as gcc 2.95.4) do not support having an unnamed union for a field in a struct.
* Add spaces after flag names on .Fl macros.gad2004-04-011-2/+2
| | | | | Noticed by: ru MFC after: 4 days
* Describe the sorting options in better and more complete detail.gad2004-03-311-6/+29
| | | | | | Also improve the description of `-L' a little. MFC after: 4 days
* Switch to using strtoul() for parsing a potential UID or GID, which getsgad2004-03-301-9/+8
| | | | | | | this to correctly handle UID's and GID's larger than 2147483647. Noticed by: bde MFC after: 1 week
* Bruce would really like the prototype for fmt() to be split across linesgad2004-03-301-1/+2
| | | | | | | this way (although I still think it "looks weird"...). Requested by: bde MFC after: 1 week
* 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
OpenPOWER on IntegriCloud