Linux memory viewing tool --- Smem, linux view --- smem

Source: Internet
Author: User

Linux memory viewing tool --- Smem, linux view --- smem

Insufficient physical memory has a great impact on the performance of Linux desktop and server systems. When your computer slows down, the first thing to do is to release the memory. Especially in a multi-user environment and a server environment that executes key tasks, memory consumption becomes more critical because multiple users and application threads will compete for more memory space at the same time.

To monitor the usage of various resources in the system (such as CPU or memory), graphical display is an efficient method. You can quickly analyze the resource consumption of each user and process through the graphical interface. In linux, the memory usage is analyzed using the command line tool smem.


Physical memory usage: RSS, PSS, and USS

Since Linux uses virtual memory, it is not that easy to accurately calculate the physical memory actually used by a process. Only knowing the virtual memory size of the process is not very useful, because the actual physical memory size still cannot be obtained.

· RSS (Residentset size), which can be queried using the top Command, is the most common memory indicator, indicating the physical memory size occupied by processes. However, adding the RSS values of each process usually exceeds the memory consumption of the entire system, because RSS contains the memory shared by each process.

· PSS (Proportionalset size) will be more accurate. It average the size of the shared memory and then shares it with various processes.

· USS (Unique set size) is a part of PSS. It only calculates the memory size occupied by the process independently and does not contain any shared part.


Common Parameters

$ Smem

By default, if no parameter is specified, the memory usage of all processes is displayed at a time rather than dynamically.


$ Smem-m

Display memory usage of each database

$ Smem-p | grepfirefox

Display usage by percentage


$ Smem-u-p

Usage Statistics by users


Graphic results

If you use a graphical interface, you can also generate graphical results.

Pie Chart

Smem -- pie name-s uss


Bar Chart

Smem -- bar pid-c "pss uss rss"



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.