—
title: Process Management in Linux
date: 2019-7-2
categories:
– Linux
—
< p>
### View
#### ps
Use ps to view the process running status at a certain point in time. ps auxf -> List the program display similar to the process tree
#### top
Use top to dynamically view the changes of the process. top [-d number] | top [-bnp]
Parameters:
-d: The number of seconds to update the configuration interface
-b: Batch processing
-n: collocation with -b, configure the results of executing top output several times
-p: specify the monitored pid
on top Commands that can be used during execution
?: Display the key commands that can be entered in top
P: Sort by CPU usage resources
M: Use MEM Sort of used resources
N: Sort by PID
T: Sort by accumulated CPU time (time+) used
k: Give a PID signal< /p>
r: Reconfigure the nice value of PID
q: Leave top
#### pstree
Check the relationship between processes. pstree [-A|-U] -[up]
Parameters:
-A: Use ASCII characters to connect inter-process relationships
-U: Use utf-8 characters to connect the relationship between processes
-p: List PID
-u: List the account of each process
### Management
Manage processes through signals
#### kill
kill -singnal PID
# ### killall
killall -signal command name