如何查看Linux中內存使用情況

  • Memory Usage

    On Linux, there are commands for almost everything.

    Memory include RAM and swap.

    • RAM
    • swap

      From ArchLinux, All about Linux swap space:

      Linux divides its physical RAM(Random Access Memory) into chucks of memory called pages. Swapping is the process whereby a page of memory is copied to the preconfigured space on the hard disk, called to swap space, to free up that page of memory.

      The combined sizes of the physical memory and the swap space is the amount of virtual memory available.

  • Methods

    1. free command
      $ free -m
      $ free -h
      
    2. /proc/meminfo
      $ cat /proc/meminfo
      
    3. vmstat
      $ vmstat -s
      
    4. top command
    5. htop
  • References

  1. 5 commands to check memory usage on Linux
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章