In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to use the top command in linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Top command is a commonly used performance analysis tool under Linux, which can display the resource consumption of each process in the system in real time, similar to the task manager of Windows.
Common option
-b: operate in batch mode
-c: displays the complete governance command
-d: screen refresh interval
-I: ignore the failure process
-s: secret mode
-S: cumulative mode
-I: set the interval
-u: specify the user name
-p: specify the process
-n: the number of times the display is looped
Introduction to the output parameters of top command
System uptime and average load
Task
The second line shows a summary of the task or process. Processes can be in different states. The number of all processes is shown here. In addition, there are running, sleeping, stopping, and the number of zombie processes (zombies are the state of a process). These process summary information can be displayed with't 'toggle.
CPU statu
Us, user: the CPU time to run (unprioritized) user processes
Sy,system: the CPU time at which kernel processes are running
Ni,niced: the CPU time to run a user process that has been prioritized
Wa,IO wait: the CPU time used to wait for IO to complete
Hi: CPU time to handle hardware interrupts
Si: CPU time to handle software interrupts
St: the CPU time that this virtual machine was stolen by hypervisor. (note: if you are currently in a vm under hypervisor, hypervisor actually consumes part of the CPU processing time.)
Memory usage
The next two lines show memory usage, which is a bit like the 'free' command. The first line is physical memory usage, and the second line is virtual memory usage (swap space). Physical memory is displayed as follows: all available memory, used memory, free memory, buffered memory. Similarly: the swap section shows all, used, free, and buffered swap space. The memory display can be switched with the'm 'command.
Field column
PID: process ID, unique identifier of the process
USER: the actual user name of the process owner.
PR: the scheduling priority of the process. Some of the values in this field are 'rt'. This means that these processes are running in real time.
NI: the nice value (priority) of the process. A smaller value means a higher priority.
VIRT: the virtual memory used by the process.
RES: resident memory size. Resident memory is the amount of non-swapped physical memory used by the task.
SHR: SHR is the shared memory used by the process.
S: this is the state of the process. It has the following different values:
D-uninterruptible sleep.
R-running state
S-sleep state
T-tracked or stopped
Z-zombie state
% CPU: the percentage of CPU time used by the task since the last update.
% MEM: the percentage of available physical memory used by the process.
TIME+: the total CPU time used since the task was started, accurate to 1% seconds.
COMMAND: the command used to run the process.
Thank you for reading! This is the end of the article on "how to use top commands in linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.