LOGO

Check Memory Usage on Linux & Ubuntu - A Quick Guide

September 11, 2006
Check Memory Usage on Linux & Ubuntu - A Quick Guide

Checking System Memory Information

To obtain details about your system's memory usage, execute the following command within a terminal window. This method is confirmed to function on Debian, Ubuntu, and Red Hat based systems.

Command Execution

cat /proc/meminfo

The command accesses and displays the contents of the /proc/meminfo file, which contains a wealth of information regarding memory allocation.

Interpreting the Output

The output you receive will resemble the following example. Note that the specific values will vary depending on your system's configuration and current usage.

MemTotal: 3615716 kB

This indicates the total amount of physical memory installed in your system, measured in kilobytes.

Further details provided include:

  • MemFree: 132528 kB – The amount of currently unused memory.
  • MemShared: 0 kB – Memory used by tmpfs (shared memory).
  • Buffers: 50028 kB – Memory used for buffering disk I/O.
  • Cached: 1572772 kB – Memory used for caching file data.
  • SwapCached: 80716 kB – Memory swapped to disk that is currently cached.
  • Active: 580208 kB – Memory actively being used by processes.
  • Inactive: 1142848 kB – Memory that is currently not being actively used.
  • HighTotal: 2752384 kB – Total memory available for high-priority processes.
  • HighFree: 8576 kB – Free memory available for high-priority processes.
  • LowTotal: 863332 kB – Total memory available for low-priority processes.
  • LowFree: 123952 kB – Free memory available for low-priority processes.
  • SwapTotal: 2104504 kB – The total size of the swap space.
  • SwapFree: 1064540 kB – The amount of free space in the swap area.

Understanding these values can help you monitor your system's memory performance and identify potential bottlenecks.

While tested on Debian, Ubuntu, and Red Hat, this command is likely compatible with other Linux distributions as well.

#linux#ubuntu#memory#ram#check memory#display memory