From ebd48c17b0c89db9bed59d7a12e64374d7cd7476 Mon Sep 17 00:00:00 2001 From: Carlos Vigil <18217279+carlosvigil@users.noreply.github.com> Date: Tue, 25 Jul 2023 13:24:43 -0400 Subject: [PATCH] ps: add OSX page (#10297) * ps: add OSX page --------- Co-authored-by: K.B.Dharun Krishna --- pages/osx/ps.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pages/osx/ps.md diff --git a/pages/osx/ps.md b/pages/osx/ps.md new file mode 100644 index 0000000000..07c841620f --- /dev/null +++ b/pages/osx/ps.md @@ -0,0 +1,28 @@ +# ps + +> Information about running processes. +> More information: . + +- 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`