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
When we write some UI components, if we don't...
HTML reuse is a term that is rarely mentioned. Tod...
First look at the effect diagram: The complete co...
Table of contents 1. Usage 1. Basic usage 2. The ...
What is NFS? network file system A method or mech...
Table of contents Preface Generation of redo log ...
A few days ago, I watched a video of a foreign gu...
Three ways to define functions in JS Let me expla...
WebRTC, which stands for Web Real-Time Communicat...
Table of contents Preface 1. Usage examples 2. Im...
Use CSS to modify the browser scroll bar style ::...
Table of contents Preface What is ssh What is ssh...
1. Each function is an object and occupies memory...
This article example shares the specific code of ...
Main library configuration 1. Configure mysql vim...