In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
The ps command in Linux is an abbreviation for Process Status. The ps command is used to list the processes currently running on the system. The ps command lists the current snapshots of those processes, that is, those at the time of the execution of the ps command. If you want to display process information dynamically, you can use the top command.
In order to monitor and control the process, we must first understand the current process, that is, we need to look at the current process, and the ps command is the most basic and powerful process view command. Use this command to determine which processes are running and running status, whether the process ends, whether the process is dead, which processes are taking up too much resources, and so on. In short, most of the information can be obtained by executing the command.
Ps provides us with an one-time view of the process, and the results it provides are not dynamic and continuous; if you want to monitor the time of the process, you should use the top tool.
The kill command is used to kill the process.
1. View all processes
Ps-eF-e: Select all processes.-F: Extra full format.
PSR (Processor) displays the CPU in which the process is located.
two。 View all processes (including threads)
Ps-eLF-e: Select all processes.-L: Show threads, possibly with LWP and NLWP columns.-F: Extra full format.
LWP (Low Weight Process), showing the thread number TID. For the Linux kernel, there is no difference between thread and process management. For users, a process may contain multiple threads. If PID and LWP are the same, the thread is the main thread of the process.
3. Custom format View
Ps-eLo pid,lwp,nlwp,sched,pri,psr,args-e: Select all processes.-L: Show threads, possibly with LWP and NLWP columns.-o: User-defined format.
You can view the parameters you want to view, such as scheduling policy, priority, etc.
4. Pstree
View processes / threads in tree format using the pstree command.
Pstree-pmurp: Show PIDs.
You might as well use the man command to see how to use ps and pstree.
The above are all the relevant knowledge points sorted out by the editor. Thank you for your study and support.
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.