The PS command is used to monitor the working conditions of the process. The process is a running program that has been in dynamic change while the PS command shows the process working state instantaneously.
How to use: Ps[options][-help]
Common parameters:
-A: Show All processes
-A: Displays all processes for a terminal. In addition to session leaders
-N: Ignore selection
-D: Displays all processes. But omit all the good leads.
-X: Shows a process with no terminal control and displays the specific path of each command
The time that the-P:PID process uses the CPU
-U: Displays the UID of the user
-g:gid or groupname show all processes for a group
-F: All listed, common and other options are used.
-J: Job Format
-O: User-defined format.
-M: Show All Threads
-H: Show hierarchy of processes
-W: Wide grid display
-L: Long lattice display
-au: Show more detailed process information
-aux: Show All processes and show detailed information
V: Display in virtual memory format
S: Display in signal format
E: Show Environment after command
H: Do not display the first line
Common usage of PS commands
PS A shows all programs under the terminal now, including other users ' programs.
PS C shows the actual instruction name of each program when the program is listed, not including the path, parameter, or indication of the resident service.
When you list a program, PS e displays the environment variables that are used by each program.
PS F is a Fu Xianchu-like structure with ASCII characters, which expresses the interrelationship between programs.
PS s uses program signal format to display program status.
PS s lists programs that contain interrupted sub-program data.
PS U Displays the status of the program in a user-oriented format.
PS x shows all the programs, not the terminal to distinguish.
Running PS aux
Head Header
User username
UID Subscriber ID (user ID)
PID Progress ID (Process ID)
PPID Process ID (parent process ID)
SID Conversation ID (session ID)
CPU utilization of the%CPU process
Memory utilization of the%MEM process
The virtual size used by the VSZ process (Vsan)
The size of the resident set used by the RSS process, or the size of the actual memory, Kbytes bytes
TTY associated with a process terminal (TTY)
Status of the stat process: process State is represented by a character (stat's status code)
R runs Runnable (on Run queue) is running or waiting in the run queue.
s sleep sleeping dormant, blocked, waiting for a condition to form or receive a signal.
I Idle Idie
The Z zombie process has terminated, but the process descriptor exists until the parent process calls the WAIT4 system call and releases it.
D non-interruptible received signal does not wake up and is not operational, the process must wait until a break occurs.
The stop process stops running after it receives the Sigstop,sigstp,sigtin,sigtou signal.
P Wait for Exchange page
W no-resident page does not have enough memory paging to allocate.
X dead Process
High-priority process
N low-priority process with lower priority sequence
L Memory Lock page lock has memory paging allocated and shrunk in memory body
Leader of the S-process (under it there are sub-processes)
I Multi-process
+ process groups in the background
Start process startup time and date
The total CPU time used by the duration process
command-line command being executed
NI Priority (Nice)
PRI Process Precedence Number (priority)
The name of the kernel function in which the Wchan process is sleeping; the name of the function is obtained from the/root/system.map file.
FLAGS the digital ID associated with the process.
Linux PS Command detailed