Linux Ask a question: How to check the memory usage of Linux

Source: Internet
Author: User

    • -1./proc/meminfo11%
    • -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.

1./proc/meminfo

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".

    1. $ Cat /proc/meminfo

2. Atop

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.

    1. $ sudo atop

3. Free

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.

    1. $ 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.

    1. $ gnome-system-monitor

5. Htop

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.

    1. $ 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.

    1. $ ksysguard

Linux Ask a question: How to check the memory usage of Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.