procmap Command
Purpose
Prints the address space map of processes.
Syntax
procmap [ -F ] [ -S ] { -X [-f] [-n] [-u] [-q]} ] ProcessID ...
Description
The /proc file system provides a mechanism to control processes. It also gives access to information about the current state of processes and threads, but in binary form. The proctools commands provide ascii reports based on some of the available information.
Most of the commands take a list of process IDs or /proc/ProcessID strings as input. The shell expansion /proc/* can therefore be used to specify all processes in the system.
Each of the proctools commands gathers information from /proc for the specified processes and displays it to the user. The proctools commands like the procrun and procstopstart and stop a process using the /proc interface.
The information gathered by the commands from /proc is a snapshot of the current state of processes, and therefore can vary at any instant except for stopped processes.
The procmap command prints the address space map of processes. It displays the starting address and size of each of the mapped segments in the process. It gets all the information necessary from the /proc/ProcessID/map files.
Flags
Item | Description |
---|---|
-F | Forces the procmap command to take control of the target process even if another process has control. |
-S | Displays shared memory information of the target process. Note: The -S option is obsolete. You can use the -X option for similar
functionality.
|
-X | Displays extended information about each address range and includes all mapped objects of the target process. |
-n | Displays unsorted address ranges for the mapped segments of the target process. |
-u | Displays the values in the most appropriate unit. The unit used in the report is specified for each metric. |
-q | Suppresses the header information. |
-f | Displays the filename instead of device number and inode number for the mapped
file of the target process. The MAPPED OBJECT column for the mapped files displays one of the
following values:
|
ProcessID | Specifies the process id. |
Item | Description |
---|---|
Start-ADD | Start address of the memory region. |
End-ADD | End address of the memory region. |
SIZE | Size of the memory region. |
MODE | Read, write and execute permission of the memory region. |
PSIZ | Page size of the memory region. The following values are displayed: |
s | 4K page size |
m | 64K page size |
L | 16M page size |
H | 16GB page size |
TYPE | Type of the memory region. The following values are displayed: |
HEAP | Heap Region |
KER/LDR | Other Kernel/Loader Segments |
KERTXT | Kernel Text |
MAINDATA | Main Data/BSS for the process |
MAINTEXT | Main Executable for the process |
MFILE | Map File |
PLIBDATA | Private Library Data |
PLIBTEXT | Private Library Text |
PMMAP | Private Memory Map |
PMMFILE | Private Memory Map file |
PMMPSXRT | Private POSIX Real Time Shared Memory Map |
REALMEM | Real Memory Mapped |
SHM | Shared Memory |
SHMEXT | Extended Shared Memory |
SHMFILE | Shared Memory File |
SLIBDATA | Shared Library Data |
SLIBTEXT | Shared Library Text |
SMMAP | Shared Memory Map |
SMMFILE | Shared Memory Map file |
SMMPSXRT | Shared POSIX Real Time Shared Memory |
STACK | Stack Region |
VSID | Virtual Segment ID of the memory region. |
MAPPED OBJECT | Mapped object name. |
Examples
- To display the address space of process 12644, enter:
The output of this command might look like this:procmap 12644
12644 : -ksh 10000000 232K read/exec ksh 20000ef8 54K read/write ksh d008b100 80K read/exec /usr/lib/libiconv.a[shr4.0] f03e4c70 41K read/write /usr/lib/libiconv.a[shr4.o] d0080100 40K read/exec /usr/lib/libi18n.a[shr.o] f03f0b78 4K read/write /usr/lib/libi18n.a[shr.o] d007a000 11K read/exec /usr/lib/nls/loc/en_US d007d130 8K read/write /usr/lib/nls/loc/en_US d00790f8 2K read/exec /usr/lib/libcrypt.a[shr.o] f03e3508 0K read/write /usr/lib/libcrypt.a[shr.o] d02156c0 2282K read/exec /usr/lib/libc.a[shr.o] f03474e0 621K read/write /usr/lib/libc.a[shr.o] Total 3380K
- To display the address ranges of process with PID 1573580,
enter:
# procmap -X 1573580 1573580 : ./self_mod_32 Start-ADD End-ADD SIZE MODE PSIZ TYPE VSID MAPPED OBJECT 0 10000000 262144K r-- m KERTXT 20002 10000000 10001d33 7K rwx sm MAINTEXT 1730DF3 self_mod_32 200001d0 200007fc 1K rw- sm MAINDATA 4F0CCF self_mod_32 200007fc 20011000 66K rw- sm HEAP 4F0CCF 20011000 20011685 1K rwx sm PLIBTEXT 4F0CCF ./libself_priv.a[dl_prv32.o] 20011685 2001234c 3K rw- sm HEAP 4F0CCF 2001234c 200125c4 0K rw- sm PLIBDATA 4F0CCF ./libself_priv.a[dl_prv32.o] 200125c4 20013000 2K rw- sm HEAP 4F0CCF 20013000 2ff23000 261184K rw- sm STACK 4F0CCF 30000000 30001000 4K rw- sm SMMFILE 8C0C0C dev:10,7 ino:35 30001000 30002000 4K r-- sm SMMFILE 8C0C0C dev:10,7 ino:36 30002000 30003000 4K rw- sm PMMFILE 8C0C0C dev:10,7 ino:35 30003000 30004000 4K r-- sm PMMFILE 8C0C0C dev:10,7 ino:36 30004000 30005000 4K rw- sm SMMPSXRT 8C0C0C POSIX RT SHM 1 30005000 30006000 4K r-- sm SMMPSXRT 8C0C0C POSIX RT SHM 1 30006000 30007000 4K rw- sm PMMPSXRT 8C0C0C POSIX RT SHM 2 30007000 30008000 4K r-- sm PMMPSXRT 8C0C0C POSIX RT SHM 2 30008000 30009000 4K rw- sm SMMAP 8C0C0C 30009000 3000a000 4K r-- sm SMMAP 8C0C0C 3000a000 3000b000 4K rw- sm PMMAP 8C0C0C 3000b000 3000c000 4K r-- sm PMMAP 8C0C0C 40000000 40000000 0K rw- s SHMFILE 250CA5 dev:10,7 ino:35 50000000 50000000 0K r-- s SHMFILE 1960D16 dev:10,7 ino:36 60000000 60001000 4K rw- sm SHM D0C8D shmid:16 70000000 70001000 4K r-- sm SHM 11F0D9F shmid:17 d0100100 d052343c 4236K rwx m SLIBTEXT 3010B81 /usr/lib/libc.a[shr.o] d0564100 d0564abe 2K rwx m SLIBTEXT 3010B81 /usr/lib/libcrypt.a[shr.o] d0652100 d0653654 5K rwx m SLIBTEXT 3010B81 ./libself.a[support32.o] d0654380 d0654a02 1K rwx m SLIBTEXT 3010B81 ./libself.a[shr32.o] d0655a80 d0656105 1K rwx m SLIBTEXT 3010B81 ./libself.a[dl_shr32.o] f05935cc f0593844 0K rw- sm PLIBDATA 17F0DFF ./libself.a[shr32.o] f06a5b6f f06a60c0 1K rw- sm PLIBDATA 17F0DFF ./libself.a[support32.o] f07b4ccc f07b4f44 0K rw- sm PLIBDATA 17F0DFF ./libself.a[dl_shr32.o] f07dfbb0 f08b7388 861K rw- sm PLIBDATA 17F0DFF /usr/lib/libc.a[shr.o] f08b86a8 f08b87c8 0K rw- sm PLIBDATA 17F0DFF /usr/lib/libcrypt.a[shr.o] Total 528579K
- To display the address ranges with file name association for the mapped file of
process with PID 2031848,
enter:
# procmap -Xf 2031848 2031848 : ./self_mod_64 Start-ADD End-ADD SIZE MODE PSIZ TYPE VSID MAPPED OBJECT 0 10000000 262144K r-- m KERTXT 20002 100000000 100002058 8K rwx sm MAINTEXT 3C0CBC self_mod_64 1100002d0 1100009e0 1K rw- sm MAINDATA 240CA4 self_mod_64 1100009e0 110010a00 64K rw- sm HEAP 240CA4 800000000000e80 8000000000012eb 1K rwx sm PLIBTEXT 5A0CDA ./libself_priv.a[dl_prv64.o] 8001000a0000180 8001000a00001c0 0K rw- sm PLIBDATA 16A0DEA ./libself_priv.a[dl_prv64.o] 800200140000000 80020014003d000 244K r-- sm KER/LDR 2A20E22 8fffffff0000000 900000000000000 262144K r-- s KER/LDR 530CD3 900000000000e00 900000000440541 4349K rwx m SLIBTEXT 28C0E0C /usr/lib/libc.a[shr_64.o] 900000000466400 900000000466f43 2K rwx m SLIBTEXT 28C0E0C /usr/lib/libcrypt.a[shr_64.o] 900000000467980 900000000468e98 5K rwx m SLIBTEXT 28C0E0C ./libself.a[support64.o] 900000000469100 900000000469568 1K rwx m SLIBTEXT 28C0E0C ./libself.a[shr64.o] 90000000046a800 90000000046ac6b 1K rwx m SLIBTEXT 28C0E0C ./libself.a[dl_shr64.o] 9001000a0000580 9001000a010cb88 1073K rw- sm PLIBDATA 12A0DAA /usr/lib/libc.a[shr_64.o] 9001000a010da28 9001000a010dbb8 0K rw- sm PLIBDATA 12A0DAA /usr/lib/libcrypt.a[shr_64.o] 9001000a0137380 9001000a01378b8 1K rw- sm PLIBDATA 12A0DAA ./libself.a[support64.o] 9001000a0248400 9001000a0248440 0K rw- sm PLIBDATA 12A0DAA ./libself.a[shr64.o] 9001000a045ab00 9001000a045ab40 0K rw- sm PLIBDATA 12A0DAA ./libself.a[dl_shr64.o] 900200140000000 900200150000000 262144K r-- s KER/LDR B70037 9ffffffd0000000 9ffffffe0000000 262144K r-- sm KER/LDR 50005 9ffffffe0000000 9fffffff0000000 262144K r-- sm KER/LDR E000E 9fffffff0000000 9fffffff000fa8e 62K rwx s SLIBTEXT 1180198 /usr/ccs/bin/usla64 9fffffff000fa8e 9fffffff000fa8e 0K rw- s PLIBDATA 1180198 /usr/ccs/bin/usla64 a00000000000000 a00000000001000 4K rw- sm SMMFILE 420CC2 /tmp/mmfile1 a00000000001000 a00000000002000 4K r-- sm SMMFILE 420CC2 /tmp/mmfile2 a00000000002000 a00000000003000 4K rw- sm PMMFILE 420CC2 /tmp/mmfile1 a00000000003000 a00000000004000 4K r-- sm PMMFILE 420CC2 /tmp/mmfile2 a00000000004000 a00000000005000 4K rw- sm SMMPSXRT 420CC2 POSIX RT SHM 1 a00000000005000 a00000000006000 4K r-- sm SMMPSXRT 420CC2 POSIX RT SHM 1 a00000000006000 a00000000007000 4K rw- sm PMMPSXRT 420CC2 POSIX RT SHM 2 a00000000007000 a00000000008000 4K r-- sm PMMPSXRT 420CC2 POSIX RT SHM 2 a00000000008000 a00000000009000 4K rw- sm SMMAP 420CC2 a00000000009000 a0000000000a000 4K r-- sm SMMAP 420CC2 a0000000000a000 a0000000000b000 4K rw- sm PMMAP 420CC2 a0000000000b000 a0000000000c000 4K r-- sm PMMAP 420CC2 a00010000000000 a00010000000000 0K rw- s SHMFILE 250CA5 /tmp/mmfile1 a00010010000000 a00010010000000 0K r-- s SHMFILE 1960D16 /tmp/mmfile2 a00020000000000 a00020000001000 4K rw- sm SHM 5B0CDB shmid:18 a00030000000000 a00030000001000 4K r-- sm SHM 1980D18 shmid:19 fffffff00000000 1000000000000000 4194304K rw- sm STACK 10D0D8D Total 5510897K
Files
Item | Description |
---|---|
/proc | Contains the /proc filesystem. |