P
S command: View
Static
The process statistics information
P s : will show only the processes that are open in the current user session without any parameters
、
P s aux : All process information will be displayed as a simple list
Comments:
U ser: The name of the user account that initiated the process
P ID: The numeric ID number of the process in the system that is unique in the current system
T yy: Indicates which terminal the process is running on, "? "Indicates unknown or does not require a terminal
s " Span style= "font-family: Arial, COLOR:RGB (255, 0, 0); font-size:16px" >tat: Displays the status of the process, s r (run), z n (Low priority), s (parent process), + (foreground run), should be manually terminated for a process that is in a zombie state
S tart: Time to start the process
Time: The process is consuming a CPU
command: Names of commands that start the process
%CPU: Percentage of CPU consumption
%MEM: Percentage of memory consumption
VSZ: the size of the fine memory (swap space)
RSS: The size of dedicated resident memory (physical memory)
P s – elf : All process information in the system is displayed in a long format and contains a richer
T op command: View process dynamic information (refreshed every three seconds)
System Tasks ( Tasks):Total: number of processes /running: Number of running processes /sleeping: number of dormant processes /stopped: Number of processes terminated /zombie: Number of zombies unresponsive processes
CPU usage information:US: User occupied /sy: Kernel occupies /ni: Priority scheduling consumes /id : Idle Cpu/wa : Waiting to occupy /hi : Hardware interrupt consumption /si : Software Interrupt usage /st : Virtualization occupies
memory consumption:total: Memory space /used: memory /free: space memory /buffers : Buffer Area
Swap space occupancy:total: Overall swap space /used: Swap space /free: Idle swap space /cached : Cache space
Press P key: Sort the list of processes based on CPU usage
Press M key: Sort by memory footprint
Press N key: Sort by start time
Press H : You can get The online Help information for top program
Press Q : You can exit the top program normally
Press k : when pid to kill , the PID number of the input process can kill the process
P grep command: Querying process Information
- L: option to output the corresponding process name at the same time
- u: option to display a process that queries a specific user
- t: option query processes running at a specific terminal
P stree: View Process Tree
-A : option to list the complete command information
- u: option to list the corresponding user name
- P: The corresponding PID number can be listed at the same time when the option is used
P stree-ap user name: the number of processes and sub-processes that the user opens can be listed
Control process
After the command that runs, add a "&" symbol, the operation is run in the background so that the user's other actions
( 1) Press Ctrl + Z key combination to suspend the current process (into the background and stop execution)
(2) View the process in the background: jobs-l
(3)bg background number : You can resume the execution of a suspended task in the background and continue to perform operations in the background
(4)FG background number : The process that is suspended to the background is re-transferred into the foreground execution
Terminate Process Execution:
K ill PID number Note: Force kill process plus -9
K illall-9 Process name: a process that kills the same name in the system
Pkill Command: depending on the name of the process, the user running the process, the terminal on which the process is located, terminates a particular process ,-u( specified user)-T (specify terminal) such as:pkill-9 –U "root" –T Tty1
~~~~~~~~~~~~~~~~~~end~~~~~~~~~~~~~~~~~~~~~~~~
Management of processes and scheduled tasks in Linux (ii) command replenishment