How to check memory in linux?

藏色散人
Release: 2020-10-13 17:35:35
Original
60806 people have browsed it

How to check the memory in Linux: 1. Check the memory through the "/proc/meminfo" method; 2. Use the free command to check the memory; 3. Use the ps command to display the memory usage of each process; 4. Use top The command displays the real-time memory usage of each process.

How to check memory in linux?

Recommendation: "linux course"

1) The easiest way to check 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 about.

$ cat /proc/meminfo
Copy after login

How to check memory in linux?

2) The free command is a quick way to view memory usage. It is an overview of the information collected by /proc/meminfo.

How to check memory in linux?

#3) The ps command can display the memory usage of each process, as well as more detailed physical memory usage and virtual memory usage. You can use the "-sort" option to sort processes, such as sorting by RSS:

$ ps aux --sort -rss
Copy after login

How to check memory in linux?

4) The top command displays the real-time memory usage of each process. It provides reports on the resident memory size of all processes, total program memory size, shared library size, etc.

How to check memory in linux?

The above is the detailed content of How to check memory in linux?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!