The top command in Linux displays the processes that the system is running. It is one of the most important tools for system administrators. is widely used for monitoring services
The load of the device. Top is an interactive command. You can also run a lot of commands when you run top. We'll explore the details of the top command to
and these commands.
(Note: The top command for different hairstyle versions, different in various details, if found not at the same time, please read your help manual and the Help in the command.) )
1.top command output:
-------------------------------------------------------------------------
First, let's look at the output of the top command, which shows a lot of information about the system, and we need to understand the different parts of the output
Meaning: The top command displays the following output:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/57/47/wKiom1SXe2_jsyWrAAVf2FMYpjo065.jpg "title=" 1059303wxpx1auj5xwww11.png "alt=" Wkiom1sxe2_jsywraavf2fmypjo065.jpg "/>
The first few lines show a summary of the different system parameters, and the home is the process and their properties in the column.
1.1 System run time and average load:
--------------------------------------------------------------------------------------------------------
The top of the output of the top command appears similar to the uptime command output.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/57/4B/wKiom1SXvB2Sx63gAAA8BqU4xYM553.jpg "title=" 1059317q7vsg9cbyqqb7po.png "alt=" Wkiom1sxvb2sx63gaaa8bqu4xym553.jpg "/>
00:15:48--------Current system time
Up 1:23--------The time the system has been running
2 users--------The number of currently logged on user
Load average:0.26,0.33,0.47----------1 minutes, 5 minutes, 15 minutes system average load
1.2 Tasks:
---------------------------------------------------------------------------------
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/4A/wKioL1SXwLvAX-YeAAA-FD6Zeh8302.jpg "title=" 1.2. PNG "alt=" wkiol1sxwlvax-yeaaa-fd6zeh8302.jpg "/>
The second line shows a summary of the task or process. The process can be in a different state.
147 Total----------of 147 tasks (process)
2 Running----------There are 2 tasks (processes) running
145 sleeping-------have 145 tasks (process) sleeping
0 stopped----------0 tasks (process) have been stopped
0 Zombie----------have 0 zombie missions (process)
1.3 CPU Status:
-------------------------------------------------------------------------------------------
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/4A/wKioL1SXwrfgT192AAA9xFtm3io291.jpg "title=" 1.3. PNG "alt=" wkiol1sxwrfgt192aaa9xftm3io291.jpg "/>
The next line shows the status of the CPU, which shows the percentage of CPU time in different modes.
1.8 Us,user---------The CPU time of the user process running (not prioritized)
1.2 Sy,system-------CPU time for running system kernel processes
0.0 ni,niced--------The CPU time of the user process running (adjusted priority)
97.0 Id,idle---------The CPU time occupied by idle processes
0.0 wa,io wait-------The CPU time spent waiting for IO to complete
0.0 Hi---------------CPU time to handle hardware interrupts
0.0 si---------------CPU time to handle software interrupts
0.0 St---------------Virtual machine is hypervisor stolen CPU time
Note: Hypervisor is an intermediate software layer that runs between the underlying physical server and the operating system, allowing multiple operating systems and applications to share hardware. Also referred to as VMM (Virtual machine Monitor)
Hypervisors is a "meta" operating system in a virtual environment. They can access the server including disk and memory
All physical devices, hypervisors not only coordinate access to these hardware resources, but also enforce protection across virtual machines
When the server starts and executes the hypervisor, it loads the operating system of all virtual machine customer service and allocates the appropriate amount of memory, CPU, network, and disk to each virtual machine.
1.4 Memory Usage:
-------------------------------------------------------------------------------------------
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/57/54/wKiom1SX1jTijt8CAABr8eMwL2U101.jpg "title=" 1.4. PNG "alt=" wkiom1sx1jtijt8caabr8emwl2u101.jpg "/>
The next two lines show memory utilization, a bit like the free command.
The first line is physical memory usage
The second line is virtual memory (swap space)
Physical memory: All memory used memory free memory buffer memory
Swap Memory: Ibid.
Memory display can be toggled with m command
1.5 Fields/Columns
-------------------------------------------------------------------------------------------
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/57/55/wKiom1SX2BDT-zafAAOhyD-drxc339.jpg "title=" 1.5. PNG "alt=" wkiom1sx2bdt-zafaaohyd-drxc339.jpg "/>
Under the system properties and states that are listed horizontally, the process is displayed in columns, and the different columns represent the properties that are explained below
PID--------Process ID, unique identifier of the process
User--------The actual username of the process owner
The PR--------the scheduling priority of the process. Some values of this field are RT, which means that these processes run in the real-time state
The nice value of the NI--------process (priority), the smaller the value means the higher the priority
VIRT virtual memory used by the--------process
RES--------resident memory size. Resident memory is the non-exchangeable physical memory size used by the task
SHR--------shared memory used by processes
S--------The state of the process, it has a different value:
D-Non-disruptive sleep state
R-Run State
S-Sleep state
T-Tracked or stopped
Z-Zombie State
%cpu-------Percentage of CPU time that is used by tasks from the last update to the current task
%MEM percentage of available physical memory used by the-------process
time+-------The total CPU time that was used since the start of the task and is now in short supply to 1% seconds.
Command-----commands used by the running process
Note: There are also many outputs that are not displayed by default, and they can display page faults, valid groups, group IDs, and other more information for a process
This article comes from "My future is not a dream!" "Blog, be sure to keep this provenance http://wangyan112.blog.51cto.com/3383033/1592587
Detailed description of top command output in Linux system