Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use the Linux command to see what memory usage methods refer to

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Use the Linux command to see what the memory usage method refers to. I believe many inexperienced people are at a loss about this. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

The easiest way for 1./proc/meminfo to see RAM usage is through / proc/meminfo. This dynamically updated virtual file is actually a combination of many other memory-related tools (such as free / ps / top). / proc/meminfo lists all the memory usage you want to know. Memory usage information for processes can also be viewed through / proc//statm and / proc//status.

Summary of methods for viewing memory usage under $cat / proc/meminfo figure 0:Linux

The 2.atopatop command is a monitoring command for a terminal environment. It shows the synthesis of various system resources (CPU, memory, network, Imax O, kernel) and is marked in color under high load.

The $sudo atop3.freefree command is a quick way to view memory usage, and it is an overview of the information gathered by / proc/meminfo.

Free-h4.GNOME System MonitorGNOME System Monitor is a view tool that shows the usage of CPU, memory, swap, and network in the most recent period. It also provides a way to view CPU and memory usage.

The $gnome-system-monitor5.htophtop command shows the real-time memory usage of each process. It provides reports on the resident memory size of all processes, the total program memory size, the shared library size, and so on. The list can scroll horizontally and vertically.

The htop6.KDE System Monitor function is the same as the GENOME version introduced in 4.

Ksysguard7.memstatmemstat is a command that effectively identifies the use of virtual memory by executable (s), process (es) and shared libraries. Given a process ID,memstat, you can list executables, data, and shared libraries associated with that process.

Memstat-p8.nmonnmon is a ncurses-based system benchmark tool that can monitor the interaction patterns of CPU, memory, Imax O, file system, and network resources. For the use of memory, it can display the total / remaining memory, swap space and other information in real time.

$nmon9.ps

The ps command can display the memory usage of each process in real time. Reported memory usage information includes% MEM (percent of physical memory used), VSZ (totalamount of virtual memory used), and RSS (totalamount of physical memory used). You can use the "- sort" option to sort processes, such as by RSS:

$ps aux-sort-rss figure Summary of methods for viewing memory usage under 8:Linux

The 10.smemsmem command allows you to count the memory usage of different processes and users based on / proc information. An analysis of memory usage can export charts (such as bar charts and pie charts).

The $sudo smem-pie name-c "pss" 11.toptop command provides real-time resource usage statistics for running programs. You can sort according to the use and size of memory.

The $top12.vmstatvmstat command displays real-time and average statistics, covering CPU, memory, Icano, and so on. For example, in the case of memory, not only physical memory is displayed, but also virtual memory is counted.

After reading the above, have you mastered the method of using the Linux command to check the memory footprint? If you want to learn more skills or want to know more about it, you are 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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report