Linux Process Management
basic understanding
Refers to the process of the program (the code) running under Linux, can be run in the foreground or the background.
Commonly used commands
-
ps option parameter: view the current process in which activities may not add parameters
commonly used option argument:
-a: shows all the process information
-u: user-friendly format to display information about processes
-x: display processes running in the background information
generally three parameters are selected, i.e. using ps -aux ways to get information about the processes
can also be used to show all ps -ef instruction format whole process, can be found corresponding to the parent of the process
can also be viewed by the pipe symbol We need content. -
Termination instruction process:
-
Options kill the process id number (-9 indicates a mandatory general election option to kill the process, you can not choose)
Example: Telnet user driven back
after this operation, the push back of the user's connection:
-
killall Process name: You can terminate multiple sub-processes belonging to the process
-
-
Dynamic monitoring of ongoing processes: top option argument
- Commonly used parameters:
-d: Specifies the updated once every few seconds (instruction: top -d number of seconds)
-i: zombie processes will not be displayed (instruction: Top -i)
-p: id number represents a monitoring process ( instruction: top -p id number) - Interactive Instruction: After typing top instruction, interactive instruction can operate at the interface of the monitoring process.
Commonly used interactive command:
k: pledged to terminate certain processes, you can terminate the instruction input id carriage return after the corresponding process.
u: pledged to view the process information belonging to a user, type the user name corresponding to the input carriage return after u
q: q Enter after typing, you can exit the top of the monitor interface
P: After pressing Enter, according to the process Sort cpu occupancy rate
M: after pressing Enter, memory usage may sort process
N: after pressing Enter, ordering process can id number
- Commonly used parameters: