Home >Operation and Maintenance >Linux Operation and Maintenance >How to check memory usage percentage in Linux?

How to check memory usage percentage in Linux?

Guanhui
GuanhuiOriginal
2020-06-16 09:41:1920363browse

How to check memory usage percentage in Linux?

#How to check the memory usage percentage in Linux?

First enter the Linux desktop and right-click to open the terminal; then enter the top command in the command line, which can display the resource usage of each process in the system in real time; finally check the 3rd line "Cpus "That's it.

How to check memory usage percentage in Linux?

Content explanation

First line (top):

  • 15:24:36 The current time of the system

  • 14 days The operation time since the system started until now

  • 3 users Users currently logged in to the system, more precisely, the number of terminals logged in to the user--the same user's connections to multiple terminals of the system at the same time will be regarded as multiple users connecting to the system. The users here The number will also be expressed as the number of terminals

  • load average is the average of the current system load. The next three values ​​are the average of the process 1 minute ago, 5 minutes ago, and 15 minutes ago. number, it can generally be considered that when this value exceeds the number of CPUs, the CPU will be harder to load the processes included in the current system

Second line (Tasks):

  • 288 total The total number of current system processes

  • 1 running The number of currently running processes

  • 287 sleeping Currently in a waiting state Number of processes in

  • 0 stopped Number of stopped system processes

  • 0 zombie Number of zombie processes

The third line (Cpus):

  • 7.3% us The percentage of CPU occupied by user space

  • 2.0% sy The percentage of CPU occupied by kernel space

  • 0.0% ni Percentage of CPU occupied by processes that have changed priorities in the user process space

  • 90.4% id Percentage of idle CPU

  • 0.3% wa Percentage of CPU time waiting for input and output

  • 0.0% hi

  • 0.0% si

  • 0.0% st

The fourth line (Mem):

  • 2042616 total total physical memory

  • 1770116 used Total physical memory used

  • ##272500 free Total free memory

  • 163912 buffers The amount of memory used as kernel cache

Fifth line (Swap):

indicates the same category as the fourth line (Mem), but here reflects the swap partition (Swap) usage. Usually, frequent use of the swap partition (Swap) will be regarded as caused by insufficient physical memory.

  • 2094076 total Total amount of swap area

  • 45052 used Total amount of swap area used

  • 2049024 free Total amount of free swap area

  • 346624 cached Total amount of cached swap area

Recommended tutorial: "

PHP 》《Linux Operation and Maintenance

The above is the detailed content of How to check memory usage percentage in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn