How to check RAM in Linux
There are several commands that you can use to check the RAM memory in Linux, such as free, vmstat, /proc/meminfo, and dmidecode. Here are some examples of how to use them:
- To check the total, used, free, and available memory in human-readable format, you can use the
free -hcommand. This will also show the swap memory, which is a virtual memory that can be used when the physical memory is full. The command output is shown below: - To check the memory statistics, such as the number of pages swapped in and out, the amount of memory that is active or inactive, and the system’s memory usage, you can use the
vmstatcommand. This will display the information in kilobytes by default, but you can use the-Soption to change the unit. - To check the detailed information about the memory, such as the total, free, available, cached, and buffered memory, as well as the low and high memory zones, you can use the
cat /proc/meminfocommand. This will display the information in kilobytes by default, but you can use the-moption to change the unit to megabytes. - To check the hardware information about the memory, such as the type, speed, size, and manufacturer of the memory modules, you can use the
dmidecode -t memorycommand. This will display the information in a table format, with each memory module having its own section.
Comments
Post a Comment