Determining the excat memory usages by certain PID

pmap -d <<pid>>
this command gives you the total number of memory usuage and open files by the perticuler PID.
Sample Output
00007f1a55e86000      4K      4K      0K      4K r--p 000000000001d000 08:02  /lib64/
00007f1a55e87000      4K      4K      4K      4K rw-p 000000000001e000 08:02  /lib64/
00007f1a55e88000    392K    264K      5K      0K r-xp 0000000000000000 08:02  /usr/sbin/httpd2-prefork
00007f1a560e9000      8K      8K      0K      8K r--p 0000000000061000 08:02  /usr/sbin/httpd2-prefork
00007f1a560eb000     12K     12K      8K     12K rw-p 0000000000063000 08:02  /usr/sbin/httpd2-prefork
00007f1a560ee000   8540K   8208K   6564K   8208K rw-p 00007f1a560ee000 00:00  [heap]
00007fff5decb000    124K    124K    124K    124K rw-p 00007ffffffe0000 00:00  [stack]
00007fff5dffe000      8K      4K      0K      0K r-xp 00007fff5dffe000 00:00  [vdso]
ffffffffff600000      4K      0K      0K      0K r-xp 0000000000000000 00:00  [vsyscall]
Total:           411136K  45916K   7838K  18240K

10188K writable-private, 232120K readonly-private, 168828K shared, and 44152K referenced

By: r00t4u
2009-12-06 05:34:46

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: