如何查看Linux中内存使用情况

    技术2022-07-11  77

    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

    free command
    $ free -m $ free -h
    /proc/meminfo
    $ cat /proc/meminfo
    vmstat
    $ vmstat -s
    top command
    htop

    References

    5 commands to check memory usage on Linux
    Processed: 0.014, SQL: 9