In the Linux system, each program can create one or more processes after it is started. For example, the httpd program that provides Web services. When a large number of users access the Web page at the same time, the httpd program may create multiple processes to provide services.
Use different command tools to view the process status from different angles. (Recommended learning: linux tutorial)
Commonly used process viewing commands
1.ps command - View static process statistics Information (Processes Statistic)
Common options:
a:显示当前终端下的所有进程信息,包括其他用户的进程。<br/>u:使用以用户为主的格式输出进程信息。<br/>x:显示当前用户在所有终端下的进程。<br/>-e:显示系统内的所有进程信息。<br/>-l:使用长(long)格式显示进程信息。<br/>-f:使用完整的(full)格式显示进程信息。<br/>
2.top command - View process dynamic information
It displays process rankings in a full-screen interactive interface and tracks system resource usage including CPU, memory, etc. in a timely manner. By default, it is refreshed every three seconds. Its function is basically similar to the task manager in Windows systems.
3.pgrep command - query process PID information based on specific conditions
4 .pstree command - View process tree and list process information in a tree structure
The above is the detailed content of How to check linux processes. For more information, please follow other related articles on the PHP Chinese website!