I. Viewing processes
1.ps Command--view static process statistics
-A: Displays all process information under the current terminal, including the processes of other users
-U: Output process information in a user-oriented format
-X: Displays process information under all terminals of the current user
-E: Displays all process information in the system
-L: Display process information with long format
-F: Displaying process information in full format
General usage: PS aux (displays static process information)
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7A/04/wKiom1agqCPwGRXGAABEt9bnGS0320.png "title=" 1.png " alt= "Wkiom1agqcpwgrxgaabet9bngs0320.png"/>
Process Information field meaning:
User: The name of the account that initiated the process
PID: PID of the process
TTY: The terminal that the process runs on,? Indicates an unknown or unwanted terminal
STAT: Shows the current state of the process (S: Hibernate R: Run Z: Zombie <: High priority N: Low priority S: Parent process +: foreground process)
Start: The time the process was started
Time: The process is consuming a CPU
Command: Names of commands that start the process
Percentage of%cpu:cpu occupied
%MEM: Percentage of memory consumption
VSZ: The size of virtual memory (swap)
RSS: The size of the resident memory (physical memory)
2.top command--view dynamic information for a process
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7A/03/wKioL1agqG-TGB2jAACj4kzMuNI860.png "title=" 2.png " alt= "Wkiol1agqg-tgb2jaacj4kzmuni860.png"/>
Show the meaning of the message:
First line: System task Information total: number of processes; running: number of running processes; sleeping: number of dormant processes; stopped: number of processes aborted; Zombie: Number of dead zombies unresponsive processes
The second line: CPU consumption information US: the user occupies; SY: kernel occupancy; NI: priority scheduling occupation; ID: idle CPU; wa:i/o waiting to occupy; Hi: Hardware interrupt occupied; SI: Software interrupt consumption; ST: virtualization occupancy;
Third line: Memory consumption (MEM) information total: overall memory space; used: used memory; free: idle memory; buffers: buffer zone
Line four: Swap space (Swap) occupies total: overall swap space; used: Swap space used: free: idle swap space; cached: Cache space
3.pgrep command--query process information
Usually the combination of-L can output the corresponding process name and PID simultaneously
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7A/04/wKiom1agqYGQrr2-AAASEaPv554764.png "title=" 3.png " alt= "Wkiom1agqygqrr2-aaaseapv554764.png"/>
-u Specifies the user's process
-T Specify terminal
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7A/03/wKioL1agqtPgO2QyAAATnnkIYD4130.png "title=" 4.png " alt= "Wkiol1agqtpgo2qyaaatnnkiyd4130.png"/>
4.pstree command--View process Tree
-P: Simultaneous display of corresponding PID
-u: Displays the corresponding user name
-A: List complete command information
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7A/04/wKiom1agq2Hg0nAtAABax1vqB7M871.png "title=" 5.png " alt= "Wkiom1agq2hg0nataabax1vqb7m871.png"/>
Two. Control process
-
Start process
Manual Start (path via command or executable program)
Scheduled start (scheduled Task)
This article is from the "Carey" blog, make sure to keep this source http://careygg.blog.51cto.com/11084669/1737356
Linux Process Management