Home > Article > Computer Tutorials > Detailed explanation of linux top command
Press 1 to see the usage of each CPU
first row
Current time Running time Current logged in user Load balancing (1 minute, 5 minutes, 10 minutes)
Load average data checks the number of active processes every 5 seconds and calculates the value. If the number divided by the number of logical CPUs exceeds 5, the system is overloaded.
second line
Total 248 processes 1 running 247 sleeping 0 stopped 0 zombie processes
The third row
us (user space): The percentage of CPU occupied by user space
sy (sysctl): The percentage of CPU occupied by kernel space
ni()—Percentage of CPU occupied by processes that have changed priority
id(idolt): Idle CPU percentage
wa(wait): IO waiting percentage of CPU occupied
hi (Hardware IRQ): Percentage of CPU occupied by hard interrupts
si (Software Interrupts): The percentage of CPU occupied by soft interrupts
Fourth line
Total memory Used memory Free memory Buffers (amount of cached memory)
The fifth line
Swap partition
Available memory=free buffer cached (total amount of swap area in Huancheng)
For memory monitoring, in top we must always monitor the used of the swap partition in the fifth line. If this value is constantly changing, it means that the kernel is constantly exchanging data between memory and swap. This is a real lack of memory. .
The total amount of memory in use (used) in the fourth line refers to the amount of memory currently controlled by the system kernel,
The total amount of free memory (free) in the fourth line is the amount that the kernel has not yet included in its control.
Not all the memory managed by the kernel is in use, it also includes memory that has been used in the past and can now be reused. The kernel does not return these reusable memories to free, so on Linux Free memory will become less and less, but don't worry about this.
Sixth line
PID — process id
USER — Process owner
PR — Process Priority
NI — nice value. Negative values represent high priority, positive values represent low priority
VIRT — The total amount of virtual memory used by the process, in kb. VIRT=SWAP RES
RES — The size of the physical memory used by the process that has not been swapped out, in kb. RES=CODE DATA
SHR — Shared memory size, unit kb
S —Process status. D=Uninterruptible sleep state R=Run S=Sleep T=Trace/Stop Z=Zombie process
%CPU — The percentage of CPU time occupied since the last update
%MEM — Percentage of physical memory used by the process
TIME — Total CPU time used by the process, unit 1/100 second
COMMAND — Process name (command name/command line)
The above is the detailed content of Detailed explanation of linux top command. For more information, please follow other related articles on the PHP Chinese website!