How to check the available memory (RAM) on a Linux computer and other useful memory diagnostic tools

Memory Diagnostic Tools for Ubuntu Linux

Here is a curated list of memory diagnostic tools for Linux.

free

To check the Random Access Memory (RAM) and swap space on Ubuntu do this:

free -h

The -h switch means that output should be displayed in a human readable format.

top

Top is our go-to utility for troubleshooting anything Linux related. Always press ‘c’ just after you’ve started top to see the whole path of the running process.

top

htop

Htop is a prettier alternative to top.

htop

ps

This command shows all processes and memory usage:

ps -eo pmem,pid,user,args

The resultant output will give you the amount of memory used, the process ID of the user using this memory, the actual user, and what the command is executing this process.

proc/meminfo

/proc/meminfo will give you system memory usage totals. Not incredibly useful but another tool in your arsenal.

cat /proc/meminfo

vmstat

Display virtual memory statistics every ten seconds:

vmstat 10

References

Tags

Share this article

Scroll to Top