Article Title: Introduction to process monitoring tools in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The Linux operating system provides users with system calls to view process information such as who, w, ps, and top. By using these system calls, we can clearly understand the running status and survival status of processes and take appropriate measures to ensure the security of the Linux system. They are currently the most common tool for viewing Process Conditions in Linux. They are released along with the Linux suite and can be used after the system is installed.
1. who command: this command is mainly used to view the current online user information. The system administrator can use the who command to monitor what every login user is doing at this moment.
2. w command: this command is also used to display the user login to the system, but unlike who, w command is more powerful, it not only shows who has logged on to the system, it can also display the work that these users are currently working on. The w command is an enhanced version of the who command.
3. ps command: this command is the most basic and powerful process view command. It can be used to determine which processes are running and running, whether the processes are terminated, whether the processes are dead, and which processes are occupying excessive resources. The ps command can monitor the working status of background processes, because background processes do not communicate with standard input/output devices such as the screen keyboard. To detect the situation, you can use the ps command.
4. top command: the basic functions of top command and ps command are the same. The current process and status of the system are displayed, but top command is a dynamic display process, you can press the buttons to refresh the current status. If you execute this command on the foreground, it excludes the foreground until the user terminates the program. More accurately, the top command provides real-time monitoring of the status of the system processor. It displays the list of CPU-most "sensitive" tasks in the system. This command can sort tasks by CPU usage, memory usage, and execution time, and many of its features can be set through interactive commands or in a custom file.