A process is a program code that runs in the CPU and memory, and each process can create one or more processes (parent and child processes). **View process method:** The first one: ps aux The ps command is used to report the process status of the current system. You can use the kill command to interrupt and delete unnecessary programs at any time. The ps command is the most basic and also very powerful process viewing command. This command can be used to determine which processes are running and their running status, whether the processes have ended, whether the processes are dead, which processes are occupying too many resources, etc. In short, most of the information can be obtained by executing this command. a: Display all process information under the current terminal, including processes of other users. u: Output process information in user-centric format. x: Display the processes of the current user in all terminals. Example: **Explanation of the fields in the above figure:** USER: The name of the user account that started the process VSZ: The size of virtual memory (swap space) occupied TTY: The terminal on which the process is running. "?" indicates unknown or unnecessary terminal START: The time when the process was started **Summary: ps aux displays process information in the form of a simple list. ** Second type: ps -elf -e: Display all process information in the system. -l: Display process information in long format. -f: Display process information using full format. Explanation of the fields in the above figure: The third type: top It displays the process ranking in a full-screen interactive interface, and tracks the usage of system resources including CPU and memory in a timely manner. It refreshes every three seconds by default. Its function is basically similar to the Task Manager in the Windows system. Explanation of the above picture: Tasks (system tasks) information: total, the total number of processes; running, the number of running processes; sleeping, the number of dormant processes; stopped, the number of terminated processes; zombie, the number of zombie and unresponsive processes. CPU information: us, user occupancy; sy, kernel occupancy; ni, priority scheduling occupancy; id, idle CPU; wa, I/O wait occupancy; hi, hardware interrupt occupancy; si, software interrupt occupancy; st, virtualization occupancy. To understand the idle CPU percentage, look at the %id part. Mem (memory) information: total, total memory space; used, used memory; free, free memory; buffers, cache area. Swap (swap space) information: total, total swap space; used, used swap space; free, free swap space; cached, cache space. The fourth type: pstree -aup The derivation relationship between processes is displayed in a tree diagram, which has a more intuitive display effect. This concludes the article about 4 ways to view processes in LINUX (summary). For more information about viewing processes in LINUX, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Eight examples of how Vue implements component communication
>>: How to delete a MySQL table
This article records the installation and configu...
Table of contents 1. What is a closure? 2. The ro...
Preface Node will be used as the middle layer in ...
Preface JavaScript is not like other languages ...
Application scenario 1: Domain name-based redirec...
To export MySQL query results to csv , you usuall...
There are many versions of the Java language. In ...
This article example shares the specific code of ...
Table of contents Preface analyze Initial Renderi...
<br />Navigation does not just refer to the ...
Before webpack packaging, we must ensure that the...
<p><b>This is bold font</b></...
Recently, when I was working on my "Football...
Introduction to sudo authority delegation su swit...
I have encountered the problem that MySQL can con...