In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to check the memory occupied by the process in Linux". In the daily operation, I believe that many people have doubts about how to view the memory occupied by the process in Linux. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubt of "how to check the memory occupied by the process in Linux". Next, please follow the editor to study!
To view the memory occupied by a process under Linux, you can first find the process id by using the ps command, such as ps-ef | grep kafka can see the process id of the kafka program.
You can see that it is 2913, and you can now view the memory using the following command:
Top-p 2913
In this way, you can see the CPU and memory occupancy in real time, and then press Q to go back to the command line.
You can also use the ps command to view: ps-aux | grep kafka
The first mark is CPU and memory usage, and the next 943100 is physical memory usage, in k, so kafka takes up about 943m of memory.
You can also view the status file of the process: cat / proc/2913/status
The corresponding value of VmRSS is physical memory usage, which is about 943m, which is the same as just now.
In addition, you can dynamically view the memory footprint through the top command
Check the top 10 memory-consuming programs through: ps aux | sort-k4jue 4nr | head-n 10
At this point, the study on "how to view the memory occupied by a process in Linux" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.