In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about how to view memory usage under Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
1./proc/meminfo
The easiest way 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.
$cat / proc/meminfo
2.atop
The atop 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.
$sudo atop
3.free
The free command is a quick way to view memory usage, and it is an overview of the information gathered by / proc/meminfo.
$free-h
4.GNOME System Monitor
GNOME 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.
$gnome-system-monitor
5.htop
The htop 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.
$htop
6.KDE System Monitor
The function is the same as the GENOME version introduced in 4.
$ksysguard
7.memstat
Memstat 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-p
8.nmon
Nmon is a ncurses-based system benchmark tool that monitors the interaction patterns of CPU, memory, Imax O, file systems, and network resources. For the use of memory, it can display the total / remaining memory, swap space and other information in real time.
$nmon
8.nmon
Nmon is a ncurses-based system benchmark tool that monitors the interaction patterns of CPU, memory, Imax O, file systems, and network resources. For the use of memory, it can display the total / remaining memory, swap space and other information in real time.
$nmon
9.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 (total amount of virtual memory used), and RSS (total amount of physical memory used). You can use the "- sort" option to sort processes, such as by RSS:
$ps aux-sort-rss
10.smem
The smem 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).
$sudo smem-pie name-c "pss"
11.top
The top command provides real-time resource usage statistics for running programs. You can sort according to the use and size of memory.
$top
12.vmstat
The vmstat command displays real-time and average statistics, covering CPU, memory, Izod O, and so on. For example, in the case of memory, not only physical memory is displayed, but also virtual memory is counted.
$vmstat-s
Thank you for reading! This is the end of this article on "how to check memory usage under Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.