Zookeeper
Function
Displays process information.
Format
Ps [options]
Main Parameters
Basic Process Selection Control
-A,-e
All processes
-N, -- deselect
Select all processes except for meeting specific conditions
-D
All except the first PROCESS OF THE SESSION
T
All processes of the Terminal
R
Only running processes are displayed.
List Selection Control
-C
Select by command name
-G
By realgroup ID
-U
Based on the user ID or user name
-P, -- pid
List by process ID
-- Ppid
Select a process based on the parent process id list
-S, -- sid
Select Based on the session id list
Output Format
-F
Complete
-- Format,-o
Custom format
-J
Job format
-M
Add a column about security data
-H
Display process levels
-- Headers
Repeat the title line
-- No-headers
Do not show title line
Thread display
-L
Display threads in the LWP and NLWP Columns
-M
Display thread after Process
Others
-V, -- version
Show version information
-- Info
Display debugging information
-- Help
Show Help Information
Example
Display All process information in standard format
Ps-ef
Output process tree
Ps-eH
Obtain thread Information
Ps-eLf
Ps-emf
Obtain security information
Ps-eM
Display All processes running as root or admin
Ps-Uroot, admin-f
Display All processes in custom format
Ps-eopid, tt, user, fname
Display only the process ID of a command
Ps-Ccommandname-o pid =
Output process name with PID 42
Ps-p 42-o comm =
Output all process information with PPID 42
Ps -- ppid42-f