System engineers are often required to check memory stats in their day to day tasks. In this article, we will discuss how you can check how much RAM is installed and used on your system CentOS 8 using the command line.
There are following commands are used to check the installed system’s RAM on CentOS 8.
Open the terminal window on your system using shortcut keys “Ctrl + Alt + t”. Type the following command on the terminal to view the Installed RAM on your system:
$ cat /proc/meminfo
In the above-mentioned output, you can see the memory of your system. The ‘cat’ is used for file concatenation.
To check the total free memory amount, physically used and swap memory, you will use the free command. The free command is also used to display the information about buffers that are used by the kernel and specifications of the RAM of your system. Type the following command to check the system’s memory:
$ free -m -h
You can use different options with the ‘free’ command to view the system’s memory information. The general syntax is as follows:
$ free [options]
The details of more free command is given below:
--help used to display help
-b,-k,-m, and -g displays output in kilobytes, Megabytes, or Gigabytes
-l display the detailed view of statistics low and high memory
-o use for old format (cache line/no -/+buffers/)
-t shows total for RAM + swap
-s use to update delay
-c use to update count
-V use to display information about version and exit
The top command is used to display memory and buffers information. You will run the below-mentioned command on your system to view memory information.
$ top
The vmstat command is used to display the memory statistics in which the user can view some additional information related to processes, block IO, traps, paging, and CPU activity. Use the following command to print statistics of memory:
$ vmstat
Or
$ vmstat -s
The dmidecode command is used for dumping table content of SMBIOS in a human-readable format. This table contains all the information related to the system’s hardware components and description of the serial number as well as BIOS revision. The basic syntax of the dmidecode command is as follows:
$ dmidecode --type memory
The following command is used to view the memory information:
$ sudo lshw -short -C memory
In this article, we have learned how to check the system’s memory on CentOS 8.0 using the command line. I hope you have really enjoyed this tutorial and it would be helpful for you. If you have any problem related to the above-mentioned commands then please let us know through feedback in the comment box.
Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…
ISPConfig is an open-source control panel that allows users to manage multiple servers from a…
As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…
Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…
Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…
phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…