2023-07-25 18:24:43 +01:00
|
|
|
# ps
|
|
|
|
|
|
|
|
> Information about running processes.
|
2024-01-31 10:20:27 +00:00
|
|
|
> More information: <https://keith.github.io/xcode-man-pages/ps.1.html>.
|
2023-07-25 18:24:43 +01:00
|
|
|
|
|
|
|
- List all running processes:
|
|
|
|
|
|
|
|
`ps aux`
|
|
|
|
|
|
|
|
- List all running processes including the full command string:
|
|
|
|
|
|
|
|
`ps auxww`
|
|
|
|
|
|
|
|
- Search for a process that matches a string:
|
|
|
|
|
|
|
|
`ps aux | grep {{string}}`
|
|
|
|
|
|
|
|
- Get the parent PID of a process:
|
|
|
|
|
|
|
|
`ps -o ppid= -p {{pid}}`
|
|
|
|
|
|
|
|
- Sort processes by memory usage:
|
|
|
|
|
|
|
|
`ps -m`
|
|
|
|
|
|
|
|
- Sort processes by CPU usage:
|
|
|
|
|
|
|
|
`ps -r`
|