In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to use smem tools to monitor memory status in the Linux system. I hope you will get something after reading this article. Let's discuss it together.
Smem is a command line tool on Linux systems that can generate a variety of memory consumption reports. Unlike existing tools, smem can report the physical memory actually used.
Memory status detection tool smem command (1) smem is a memory usage reporting tool under the command line, which can provide users with a variety of reports on memory usage under the Linux system. Unlike existing tools, seme can report PSS (physical memory actually used (PSS), so as to measure the amount of memory occupied by virtual memory system libraries and applications. (2) most of the physical memory is usually shared between multiple applications
The linux system uses virtual memory (virtual memory), so it is not easy to accurately calculate the physical memory actually used by a process. Knowing only the virtual memory size of the process is not very useful, because there is no way to get the actual physical memory allocated.
RSS- (resident set size): the amount of physical memory occupied by the process RSS is the resident set size, that is, the physical memory of the non-swap area used by the process.
(1) the top command can also query the most commonly used memory metrics. (2) after adding the RSS values in each process, it generally exceeds the memory consumption of the whole system. This is because the RSS contains the shared memory between processes.
PSS- (proportion set size) scale set size
When all programs that use a shared library share the memory occupied by the shared library, it is obvious that the sum of the PSS of all processes is the amount of memory used by the system, which is more accurate. After averaging the size of the shared memory, it is allocated to each process.
USS- (unique set size): the memory occupied by the process alone only calculates the amount of memory occupied by the process alone, and does not contain any shared parts
Install smem tools
Yum install epel-release yum install smem python-matplotlib python-tk displays the memory consumption status of each process in the system
Smem-k displays units on output, making it easy to view the market memory footprint.
Smem-K # Parameter description-K # displays memory units-s # to sort
Smem-s pss/uss/rss specifies the content to sort
Smem-s pss
Smem-p reports memory usage as a percentage, so you can clearly observe the proportion of each process occupying Xiyong.
Smem-p
Smem-u displays the size of memory occupied by users of the system
Smem-u-k
Specify the amount of memory used by the user process for viewing
Smem-P mysql # (uppercase P) smem-k-P mysql after reading this article, I believe you have some understanding of "how to use smem tools to monitor memory status in Linux system". If you want to know more about it, welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.