Linux Pmap Command - Find How Much Memory Process Use

The Linux pmap command display the memory usage map of a process or multiple processes. Pmap reports information about the address space or memory usage map of a process.

Pmap is actually a Sun OS command and Linux supports only very limited number of features. But it is very helpful for finding the complete address space of a process. To check memory usage of process we need PID or unique process ID of running process, we can get PID from /proc or regular commands like top or ps.

Syntax or usage

#pmap PID


#pmap [options] PID

In the output, it displays total address, kbytes, mode and mapping.


-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.

1) Memory usage map of single process

[[email protected] ~]# pmap 1013

1013: /usr/sbin/sshd
00110000 1480K r-x-- /usr/lib/
00282000 80K rw--- /usr/lib/
00296000 12K rw--- [ anon ] 00299000 36K r-x-- /lib/
002a2000 4K rw--- /lib/
002a3000 16K r-x-- /lib/
002a7000 4K rw--- /lib/
002ab000 88K r-x-- /lib/
002c1000 4K r---- /lib/
002c2000 4K rw--- /lib/
002c3000 216K r-x-- /lib/
002f9000 4K rw--- /lib/
002fa000 808K r-x-- /lib/
003c4000 24K rw--- /lib/
003ca000 152K r-x-- /lib/
003f0000 4K rw--- /lib/
003f1000 92K r-x-- /usr/lib/
00738000 4K r---- /lib/
00739000 4K rw--- /lib/
0073a000 8K rw--- [ anon ] 00825000 120K r-x-- /lib/
00843000 4K r---- /lib/
00844000 4K rw--- /lib/
0090d000 32K r-x-- /lib/
00915000 4K rw--- /lib/
00948000 484K r-x-- /usr/sbin/sshd
009c1000 8K rw--- /usr/sbin/sshd
009c3000 20K rw--- [ anon ] 009e0000 92K r-x-- /lib/
009f7000 4K r---- /lib/

total 8232K

2) Memory usage map of multiple processes

We can check memory map of multiple processes by inserting multiple PIDs. Add multiple PIDs with adding space.

pmap 1013 1217 1118

3) Extended memory map about a process

[[email protected] ~]# pmap -x 1013
1013: /usr/sbin/sshd
Address Kbytes RSS Dirty Mode Mapping
00110000 1480 92 0 r-x--
00282000 80 80 80 rw---
00296000 12 8 4 rw--- [ anon ] 00299000 36 0 0 r-x--
002a2000 4 4 4 rw---
002a3000 16 0 0 r-x--
002a7000 4 4 4 rw---
002ab000 88 4 0 r-x--
002c1000 4 4 4 r----
002c2000 4 4 4 rw---
002c3000 216 4 0 r-x--
002f9000 4 4 4 rw---
002fa000 808 4 0 r-x--
003c4000 24 24 24 rw---
003ca000 152 4 0 r-x--
003f0000 4 4 4 rw---
003f1000 92 0 0 r-x--
00408000 12 12 12 rw---
0040b000 12 0 0 r-x--
0040e000 4 4 4 rw---

-------- ------- ------- ------- -------
total kB 8232 - - -

Here Address, Kbyte, Dirty, RSS, mode and mapping contains information as below

Extended and Device Format Fields

Address: start address of map
Kbytes: size of map in kilobytes
RSS: resident set size in kilobytes
Dirty: dirty pages (both shared and private) in kilobytes
Mode: permissions on map: read, write, execute, shared, private (copy on write)
Mapping: file backing the map, or '[ anon ]' for allocated memory, or '[ stack ]' for the program stack
Offset: offset into the file
Device: device name (major:minor)

Bobbin Zachariah 9:29 am

About Bobbin Zachariah

Founder of LinOxide, passionate lover of Linux and technology writer. Started his career in Linux / Opensource from 2000. Love traveling, blogging and listening music. Reach Bobbin Zachariah about me page and google plus page.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.