Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Linux Tutorials: pmap commands examples

pmap-commands

You can find the memory used by a program (process) by looking into /proc directory or using standard command such as ps or top.

However, you must calculate all memory usage by hand i.e. add Shared Memory + mapped file + total virtual memory size of the process + Resident Set Size + non-swapped physical memory used by process. So how do you find the total memory used by a process or program under Linux? Use a tool called pmap. It reports the memory map of a process or processes.
To display process mappings, type
$ pmap pid
$ pmap 3724
If you want to see the exented format
The -x option can be used to provide information about the memory allocation and mapping types per mapping. The amount of resident, non-shared anonymous, and locked memory is shown for each mapping:
$ pmap -x 3526
If you want to see the device format
$ pmap -d 3526
If you do not display some header/footer lines.
$ pmap -q 3526
GENERAL OPTIONS
-x extended Show the extended format.
-d device Show the device format.
-q quiet Do not display some header/footer lines.
-V show version Displays version of program.
Reference
Rajesh Kumar
Follow me
Latest posts by Rajesh Kumar (see all)
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x