2013-12-08 08:56:16 +00:00
|
|
|
# ps
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Information about running processes.
|
2021-10-06 22:51:52 +01:00
|
|
|
> More information: <https://manned.org/ps>.
|
2013-12-08 08:56:16 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- List all running processes:
|
2013-12-08 08:56:16 +00:00
|
|
|
|
|
|
|
`ps aux`
|
A bunch of new pages:
common/: dig, gzip, rm, sort, zfs, zpool
linux/: apt-get, shutdown
osx/: airport, caffeinate, diskutil, networksetup open, pgrep, qlmanage, say, shutdown, sysctl, system_profiler
Edits to existing pages:
curl: Added simple download example
find: Added iname and size exmaples
grep: Edited -c description
ps: Added wide lines example
ssh: edited -D description, added simple port forwarding example
unzip: added list option
2014-02-10 20:36:05 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- List all running processes including the full command string:
|
A bunch of new pages:
common/: dig, gzip, rm, sort, zfs, zpool
linux/: apt-get, shutdown
osx/: airport, caffeinate, diskutil, networksetup open, pgrep, qlmanage, say, shutdown, sysctl, system_profiler
Edits to existing pages:
curl: Added simple download example
find: Added iname and size exmaples
grep: Edited -c description
ps: Added wide lines example
ssh: edited -D description, added simple port forwarding example
unzip: added list option
2014-02-10 20:36:05 +00:00
|
|
|
|
|
|
|
`ps auxww`
|
2014-03-23 23:52:15 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Search for a process that matches a string:
|
2014-03-23 23:52:15 +00:00
|
|
|
|
|
|
|
`ps aux | grep {{string}}`
|
2017-11-23 11:53:54 +00:00
|
|
|
|
2017-11-23 12:01:50 +00:00
|
|
|
- List all processes of the current user in extra full format:
|
2017-11-23 11:53:54 +00:00
|
|
|
|
2017-11-24 12:04:02 +00:00
|
|
|
`ps --user $(id -u) -F`
|
2017-11-23 11:53:54 +00:00
|
|
|
|
2017-11-24 11:50:38 +00:00
|
|
|
- List all processes of the current user as a tree:
|
2017-11-23 11:53:54 +00:00
|
|
|
|
2017-11-24 12:04:02 +00:00
|
|
|
`ps --user $(id -u) f`
|
2018-01-15 21:36:37 +00:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Get the parent PID of a process:
|
2018-01-15 21:36:37 +00:00
|
|
|
|
|
|
|
`ps -o ppid= -p {{pid}}`
|
2020-07-28 15:34:12 +01:00
|
|
|
|
|
|
|
- Sort processes by memory consumption:
|
|
|
|
|
|
|
|
`ps --sort size`
|