- -2. Atop20%
- -3. Free29%
- -4. GNOME System monitor35%
- -5. Htop41%
- -6. KDE System monitor47%
- -7. Memstat54%
- -8. Nmon60%
- -9. Ps67%
- -10. Smem73%
- -11. Top81%
- -12. Vmstat89%
problem : I want to monitor the memory usage of Linux systems. What graphical interfaces or command-line tools are available to check current memory usage?
Physical memory is one of the most important factors when it comes to optimizing the performance of Linux systems. Naturally, Linux offers a wealth of choices to monitor the use of precious memory resources. Different tools vary in the monitoring granularity (e.g., system-wide, per-process, per-user), interface modes (e.g. graphical user interface, command line, ncurses) or run mode (interactive mode, batch processing mode).
The following is a list of available, but not exhaustive, graphical or command-line tools used to check the memory used and available in the Linux platform.
One of the simplest ways to check memory usage is through "/proc/meminfo". This dynamically updated virtual file is actually a source of information for memory-related tools such as Free,top and PS. From the amount of available/idle physical memory to the number of waiting to be written to the cache, or the number of write-back disks, "/proc/meminfo" has everything you need for information about memory usage. Memory information for a particular process can also be obtained through "/PROC/<PID>/STATM" and "/proc/<pid>/status".
- $ Cat /proc/meminfo
The atop command is an interactive, ncurses-based system and process monitoring tool for the terminal environment. It shows a summary of dynamically updated system resources (CPU, memory, network, input/output, kernel), and highlights the high-load parts of the system with warning messages in bold colors. It also provides a view of the thread (or user) resource usage similar to top, so the system administrator can find which process or user is causing the system load. The memory Statistics report includes total/idle memory, cached/buffered memory, and committed virtual memory.
- $ sudo atop
The free command is a quick and easy way to get an overview of memory usage, which is obtained from "/proc/meminfo". It provides a snapshot of the total/idle physical memory and system swap area, as well as the used/idle kernel buffers.
- $ free -h
4. GNOME System Monitor
GNOME system Monitor is a graphical interface application that shows more recent historical information about the utilization of system resources, including CPU, memory, swap, and network. It can also provide a view of the process with CPU and memory usage.
- $ gnome-system-monitor
The Htop command is an interactive, ncurses-based process view that shows the memory usage of each process in real time. It can report the resident memory size (RSS) of all running processes, the total size of the program in memory, the library size, the shared page size, and the dirty page size. You can scroll through the list of processes horizontally or vertically to view them.
- $ htop
6. KDE System Monitor
Just as the GNOME desktop has GNOME System Monitor, the KDE desktop has its own counterpart: the KDE System Monitor. The functionality of this tool is very similar to the GNOME version, meaning it also shows a real-time history of system resource usage and cpu/memory consumption with each process.
- $ ksysguard
Linux Ask a question: How to check the memory usage of Linux