Memory check commands in Linux

To see your Linux memory information and memory stats are very useful tools for investigation overload problems and server stability.

Memory include RAM and swap.

free -m

The free command is the most simple and easy to use command to check memory usage on linux. Here is a quick example:

$ free -m


The next way to check memory usage is to read the /proc/meminfo file. Know that the /proc file system does not contain real files. They are rather virtual files that contain dynamic information about the kernel and the system:

$ cat /proc/meminfo


The vmstat command with the s option, lays out the memory usage statistics much like the proc command. Here is an example:

$ vmstat -s

top command

The top command is generally used to check memory and cpu usage per process. However it also reports total memory usage and can be used to monitor the total RAM usage. The header on output has the required information. Here is a sample output:


htop command

Similar to the top command, the htop command also shows memory usage along with various other details:


Looking for a custom solution?

Our technicians can provide you with the best custom made solutions on the market, no matter whether you're a small business or large enterprise.

Get in touch