CentOS Linux: Find Memory (RAM) Usage Information Command

There are several ways to find memory usage information on a CentOS Linux system. Here are some common commands:

  1. free: This command displays the amount of free and used memory in the system, as well as the swap space usage. The output is in kilobytes:
    $ free -h

    The -h option displays the output in human-readable format.

  2. top: This command is an interactive process monitor that provides a real-time view of the system. To view memory usage information, press the m key to sort by memory usage. The output shows the amount of total, used, and free memory, as well as the memory usage of each process:
    $ top
  3. vmstat: This command displays information about system processes, memory, paging, block IO, and CPU activity. To see memory usage information, type:
    $ vmstat -s

    The -s option displays the output in a summary format, including the total amount of memory and the used and free memory.

  4. /proc/meminfo: This file contains information about memory usage on the system. To view the contents of this file, type:
    $ cat /proc/meminfo

    The output includes the total amount of memory, the used and free memory, and information about the swap space.

You can use any of these commands to find memory usage information on a CentOS Linux system.

Leave a Comment