How to check the memory usage of Linux

Source: Internet
Author: User

How to check the memory usage of Linux

Problem: I want to monitor the memory usage of Linux. Which graphic interfaces or command line tools are available to check the current memory usage?

When it comes to Linux system performance optimization, physical memory is the most important factor. Naturally, Linux provides a variety of options to monitor the usage of precious memory resources. Different tools, in the monitoring granularity (for example, full system scope, each process, each user), interface methods (such as: graphical user interface, command line, ncurses) or the running mode (Interactive Mode and batch processing mode) is different.

The following is a list of optional but not comprehensive graphics or command line tools used to check the memory used and available on the Linux platform.

1./proc/meminfo

One of the simplest ways is to use "/proc/meminfo" to check memory usage. This dynamically updated Virtual File is actually a source of information for memory-related tools such as free, top, and ps. From the number of available/idle physical memory to the number of waiting to be written to the cache or the number of written back disks, "/proc/meminfo" is everything you want about memory usage. The memory information of a specific process can also be obtained through "/proc/<pid>/statm" and "/proc/<pid>/status.

  1. $ Cat/proc/meminfo

2. atop

The atop command is an ncurses-based interactive system and process monitoring tool for the terminal environment. It displays the summary of dynamically updated system resources (CPU, memory, network, input/output, kernel), and marks the High-load part of the system in a highlighted color with warning information. It also provides a resource usage view similar to top threads (or users), so the system administrator can find the process or user-caused system load. The memory statistics report includes the total/idle memory, cached/buffered memory, and submitted virtual memory.

  1. $ Sudo atop

3. free

The free command is a quick and easy way to get the memory usage overview, which is obtained from "/proc/meminfo. It provides a snapshot to display the total/idle physical memory and system swap areas, as well as the used/idle kernel buffer.

  1. $ Free-h

4. GNOME System Monitor

GNOME System Monitor is a graphical application that displays recent historical information about System resource usage, including CPU, memory, swap zone, and network. It also provides a process view with CPU and memory usage.

  1. $ Gnome-system-monitor

5. htop

The htop command is an interactive process view based on ncurses. It displays 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 programs in the memory, the library size, the shared page size, and the dirty page size. You can scroll through the process list either horizontally or vertically.

Why does Linux's htop command win the top command?

Use the most powerful process monitor htop in Ubuntu

Install htop process management and monitoring tools in CentOS 6.5

  1. $ Htop

6. KDE System Monitor

Like GNOME desktop with GNOME System Monitor, KDE Desktop also has its own counterpart application: KDE System Monitor. The features of this tool are very similar to those of GNOME, that is, it also shows a real-time history of system resource usage and CPU/memory consumption of each process.

  1. $ Ksysguard

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • Next Page

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.