Using the PS command in Linux, you can see which processes are running and running, whether the process is over, if the process has no zombies, which processes are consuming too many resources, and so on. PS commands are most commonly used to monitor the work of background processes.
Name: PS
Usage rights: All users
How to use: PS [options] [--help]
Description: Shows the dynamics of the instantaneous stroke (process)
Parameters:
The parameters of PS are very numerous, and only a few commonly used parameters are listed here and the meaning is roughly
-A lists all trips
-W display widen to show more information
-au Show more detailed information
-aux Show all itineraries that contain other users
AU (x) output format:
USER PID%cpu%MEM VSZ RSS TTY STAT START time COMMAND
User: Owner of the itinerary
Pid:pid
%CPU: CPU Usage consumed
%MEM: Usage of memory consumed
VSZ: Virtual Memory size occupied
RSS: Size of memory consumed
TTY: Secondary device number for the terminal (minor device numbers of TTY)
STAT: The status of the trip:
D: Non-interruptible static (through throb-AV b for I/O action)
R: Executing in progress
S: Stationary state
T: Pause execution
Z: Not present but cannot be eliminated temporarily
W: Not enough memory paging to allocate
<: high-priority itineraries
N: Low-priority stroke
L: Memory paged and locked in memory (instant system or I/O)
Start: Trip start time
Time: When it was executed
Command: the command executed
Example:
1) PS A shows all the programs under the current terminal, including other users ' programs.
2) ps-a Show All Programs.
3) PS C lists the program, displays the actual instruction name of each program, and does not include the path, parameter or the indication of the resident service.
4) Ps-e The effect of this parameter is the same as specifying the "A" parameter.
5) When listing the program, PS e displays the environment variables used by each program.
6) PS F Displays the tree structure with ASCII characters, expressing the relationship between the programs.
7) ps-h shows the tree structure, indicating the relationship between the programs.
8) Ps-n shows all the programs except the program under the PS Command Terminal.
9) PS s uses the program signal format to display the program status.
PS S when listing programs, including interrupted sub-program data.
ps-t< Terminal number > Specify the terminal number, and list the status of the program belonging to the terminal.
PS U Displays the status of the program in a user-oriented format.
PS x Displays all programs and does not differentiate by terminal.
The most common approach is to Ps-aux, and then use a pipe symbol to direct to grep to find a specific process and then manipulate the specific process.
ps command usage in Linux.