Top command
[email protected] ~]# Top
top-12:40:09 up 8 min, 2 users, load Average:0.01, 0.12, 0.12
tasks:455 Total, 1 running, 454 sleeping, 0 stopped, 0 zombie
%CPU (s): 1.4 us, 1.9 sy, 0.0 ni, 93.7 ID, 3.0 wa, 0.0 hi, 0.0 si, 0.0th
KiB mem:2902976 Total, 1086748 used, 1816228 free, 884 buffers
KiB swap:2113532 Total, 0 used, 2113532 free. 248536 Cached Mem
PID USER PR NI VIRT RES SHR S%cpu%MEM time+ COMMAND
3281 Root 0 123980 1824 1100 R 6.0 0.1 0:00.02 Top
1 root 0 52864 6716 3764 S 0.0 0.2 0:02.32 systemd
2 Root 0 0 0 0 S 0.0 0.0 0:00.04 Kthreadd
3 Root 0 0 0 0 S 0.0 0.0 0:00.47 ksoftirqd/0
5 root 0-20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0h
First line load average meaning
The load in the Linux system measures the current CPU workload. It is also simple to say the length of the process queue. Load Average is the average load over a period of time (1 minutes, 5 minutes, 15 minutes).
Single-Core processors
Suppose our system is a single CPU single core, it is likened to a one-way road, the CPU task compared to a car. When the car was not much, load <1; load=1 when the car occupied the whole road, when the road was full, and the road was full of cars, load>1
Multi-Core processors
We often find that server load > 1 is still good, because the server is a multi-core processor (multi-core).
Assuming that our server CPU is 2 cores, then it will mean we have 2 roads, our load = 2 o'clock, all roads are full of vehicles.
Load = 2 o'clock the road is full.
Second line of process information
- Total process Totals
- Running number of processes that are running
- Sleeping the number of sleep processes
- Stopped number of processes stopped
- Zombie Number of zombie processes
Third line CPU Information
- 0.3% US user space consumes CPU percentage
- 1.0% SY core space CPU percent occupied
- 0.0% CPU Percentage of processes that have changed priority within NI user process space
- 98.7% ID Idle CPU percent
- 0.0% wa wait for the input output CPU time percentage
- 0.0%hi: Hardware CPU Interrupt occupancy percentage
- 0.0%si: Percentage of soft interrupt occupancy
- 0.0%ST: Virtual machine occupancy percentage
last two behavior memory information
Mem:
- Total physical memory of 191272k
- Total physical memory used by 173656k used
- 17616k free Memory Total
- The amount of memory that 22052k buffers uses as the kernel cache
Swap:
- Total Swap Area 192772k
- Total swap area used by 0k used
- 192772k Free Swap Area total
- 123988k cached Buffer The total amount of swap, in-memory content is swapped out to the swap area, and then swapped into memory, but the used swap area has not been overwritten, the value is that the content already exists in the memory of the swap area, the corresponding memory will be swapped out when the swap area can no longer write.
Linux Top command