In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces Linux how to view the running process of the relevant knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe that everyone after reading this Linux how to view the running process article will have a harvest, let's take a look at it.
Ps command
Enter the following ps command to display all running processes:
# ps aux | less of which
-A: show all processes
A: displays all processes that include other users in the terminal
X: displays the process without a controlled terminal
Task: view each process in the system.
# ps-A # ps-e task: view processes that are not running on root
# ps-U root-u root-N task: view the processes running by the user vivek
# ps-u vivektop command
The top command provides a dynamic real-time view of the running system. At the command prompt, enter top:
# top output:
Figure 1:top command: display Linux task
Press Q to exit and h to help.
Displays a tree view of the process
Pstree displays running processes in a tree. The root node of the tree is pid or init. If a user name is specified, the process tree takes the process owned by the user as the root node.
Example of $pstree output:
Figure 2:pstree-A tree view showing the process
Task: print the process tree using ps
# ps-ejH # ps axjf task: get thread information
Enter the following command:
# ps-eLf # ps axms task: get security information
Enter the following command:
# ps-eo euser,ruser,suser,fuser,f,comm,label # ps axZ # ps-eM task: save the process snapshot to a file
Enter the following command:
# top-b-N1 > / tmp/process.log you can also email the results to yourself:
# top-b-N1 | mail-s' Process snapshot' you@example.com task: find the process
Use the pgrep command. Pgrep can find the currently running processes and list the eligible processes ID. For example, the process ID that displays the firefox:
The following command for $pgrep firefox displays the process with the name sshd and the owner root.
$pgrep-u root sshd says hello to htop and atop
Htop is an interactive process viewer similar to top, but you can scroll vertically and horizontally to view all processes and their command line. PID is not required for the related operation (killing,renicing) of the process. To install the htop input command:
# apt-get install htop or
# yum install htop enter htop at the command prompt:
# example of htop output:
Figure 3:htop-Interactive Linux / UNIX process viewer
Atop tool
Atop is an interactive monitoring tool for viewing the load of a Linux system. It shows the use of critical hardware resources at the system level (from a performance perspective), such as CPU, memory, hard drives, and networks.
It can also show which process is causing a specific load based on process-level CPU and memory load; if kernel patches have been installed, it can show the hard disk and network load of each process. Enter the following command to start atop:
# example of atop output:
This is the end of the article on "how to view running processes in Linux". Thank you for reading! I believe you all have a certain understanding of "how to view running processes in Linux". If you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.