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

How to check how much memory a process uses under CentOS

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly explains "how to check how much memory is used by the process under CentOS". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to check how much memory the process uses under CentOS".

Grammar or usage

# pmap PID

Or

# pmap [options] PID

It shows all the addresses, kbytes,mode and mapping in the output.

Option

-x extended display extension format

-d device display device format

-Q quiet does not display header/footer lines

-V displays version information

Single process memory state

[root@info ~] # pmap 1013

1013: / usr/sbin/sshd

00110000 1480K rmurx-/ usr/lib/libcrypto.so.1.0.0

00282000 80K rw-- / usr/lib/libcrypto.so.1.0.0

00296000 12K rw-- [anon]

00299000 36K rmurf x-/ lib/libkrb5support.so.0.1

002a2000 4K rw-- / lib/libkrb5support.so.0.1

002a3000 16K rmurx-/ lib/libplc4.so

002a7000 4K rw-- / lib/libplc4.so

002ab000 88K rmurx-/ lib/libaudit.so.1.0.0

002c1000 4K rmuri-/ lib/libaudit.so.1.0.0

002c2000 4K rw-- / lib/libaudit.so.1.0.0

002c3000 216K rmurx-/ lib/libgssapi_krb5.so.2.2

002f9000 4K rw-- / lib/libgssapi_krb5.so.2.2

002fa000 808K rmurx-/ lib/libkrb5.so.3.3

003c4000 24K rw-- / lib/libkrb5.so.3.3

003ca000 152K rmurx-/ lib/libk5crypto.so.3.1

003f0000 4K rw-- / lib/libk5crypto.so.3.1

003f1000 92K rmurx-/ usr/lib/libnssutil3.so

00738000 4K rmuri-/ lib/libresolv-2.12.so

00739000 4K rw-- / lib/libresolv-2.12.so

0073a000 8K rw-- [anon]

00825000 120K rmurx-/ lib/ld-2.12.so

00843000 4K rmuri-/ lib/ld-2.12.so

00844000 4K rw-- / lib/ld-2.12.so

0090d000 32K rmurx-/ lib/libwrap.so.0.7.6

00915000 4K rw-- / lib/libwrap.so.0.7.6

00948000 484K rMui x-/ usr/sbin/sshd

009c1000 8K rw-- / usr/sbin/sshd

009c3000 20K rw-- [anon]

009e0000 92K rmurx-/ lib/libpthread-2.12.so

009f7000 4K rmuri-/ lib/libpthread-2.12.so

Total 8232K

Multi-process memory state

We can check multi-process memory by inserting multiple PID. Add multiple PID separated by spaces.

Pmap 1013 1217 1118

Expand process memory

[root@info ~] # pmap-x

1013 1013: / usr/sbin/sshd

Address Kbytes RSS Dirty Mode Mapping

00110000 1480 92 20 r Murray x-libcrypto.so.1.0.0

00282000 80 80 80 rw-- libcrypto.so.1.0.0

00296000 12 8 4 rw-- [anon]

00299000 3600 r Murray x-libkrb5support.so.0.1

002a2000 4 4 4 rw-- libkrb5support.so.0.1

002a3000 1600 r Murray x-libplc4.so

002a7000 4 4 4 rw-- libplc4.so

002ab000 88 4 0 r Murray x-libaudit.so.1.0.0

002c1000 4 4 4 r Murray-libaudit.so.1.0.0

002c2000 4 4 4 rw-- libaudit.so.1.0.0

002c3000 21640 r Murray x-libgssapi_krb5.so.2.2

002f9000 4 4 4 rw-- libgssapi_krb5.so.2.2

002fa000 808 4 0 r Murray x-libkrb5.so.3.3

003c4000 24 24 24 rw-- libkrb5.so.3.3

003ca000 15240 r Murray x-libk5crypto.so.3.1

003f0000 4 4 4 rw-- libk5crypto.so.3.1

003f1000 9200 r Murray x-libnssutil3.so

00408000 12 12 12 rw-- libnssutil3.so

0040b000 1200 r Murray x-libplds4.so

0040e000 4 4 4 rw-- libplds4.so

-

Total kB 8232-

Thank you for reading, the above is the content of "how to check how much memory the process uses under CentOS". After the study of this article, I believe you have a deeper understanding of how to check how much memory the process uses under CentOS, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Servers

Wechat

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

12
Report