Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man1 / pmap.1
blob9b158fc5bfd8297525840209032a40df2fcefd46
1 '\" te
2 .\"  Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PMAP 1 "April 9, 2016"
7 .SH NAME
8 pmap \- display information about the address space of a process
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/bin/pmap\fR [\fB-rslF\fR] [\fB-A\fR \fIaddress_range\fR] [\fIpid\fR | \fIcore\fR]...
13 .fi
15 .LP
16 .nf
17 \fB/usr/bin/pmap\fR \fB-L\fR [\fB-rslF\fR] [\fB-A\fR \fIaddress_range\fR] [\fIpid\fR] ...
18 .fi
20 .LP
21 .nf
22 \fB/usr/bin/pmap\fR \fB-x\fR [\fB-aslF\fR] [\fB-A\fR \fIaddress_range\fR] [\fIpid\fR | \fIcore\fR]...
23 .fi
25 .LP
26 .nf
27 \fB/usr/bin/pmap\fR \fB-S\fR [\fB-alF\fR] [\fB-A\fR \fIaddress_range\fR] [\fIpid\fR | \fIcore\fR]...
28 .fi
30 .SH DESCRIPTION
31 .LP
32 The \fBpmap\fR utility prints information about the address space of a process.
33 .SH OPTIONS
34 .LP
35 The following options are supported:
36 .sp
37 .ne 2
38 .na
39 \fB\fB-a\fR\fR
40 .ad
41 .RS 20n
42 Prints anonymous and swap reservations for shared mappings.
43 .RE
45 .sp
46 .ne 2
47 .na
48 \fB\fB-A\fR \fIaddress_range\fR\fR
49 .ad
50 .RS 20n
51 Specifies the subrange of address space to display. \fIaddress_range\fR is
52 specified in one of the following forms:
53 .sp
54 .ne 2
55 .na
56 \fB\fIstart_addr\fR\fR
57 .ad
58 .sp .6
59 .RS 4n
60 A single address limits the output to the segment (or the page if the \fB-L\fR
61 option is present) containing that address. If the specified address
62 corresponds to the starting address of a segment, the output always includes
63 the whole segment even when the \fB-L\fR option is specified.
64 .RE
66 .sp
67 .ne 2
68 .na
69 \fB\fIstart_addr\fR\fB,\fR\fR
70 .ad
71 .sp .6
72 .RS 4n
73 An address followed by comma without the end address limits the output to all
74 segments (or pages if the \fB-L\fR option is present) starting from the one
75 containing the specified address.
76 .RE
78 .sp
79 .ne 2
80 .na
81 \fB\fIstart_addr\fR\fB,\fR\fIend_addr\fR\fR
82 .ad
83 .sp .6
84 .RS 4n
85 An address range specified by the start address and end addresses limits the
86 output to all segments (or pages if the \fB-L\fR option is present) starting
87 from the segment or page containing the start address through the segment or
88 page containing the end address.
89 .RE
91 .sp
92 .ne 2
93 .na
94 \fB\fB,\fR\fIend_addr\fR\fR
95 .ad
96 .sp .6
97 .RS 4n
98 An address range started with comma without the start address limits the output
99 to all segments (or pages if the \fB-L\fR option is present) starting from the
100 first one present until the segment (or page if the \fB-L\fR option is present)
101 containing the specified address.
107 .ne 2
109 \fB\fB-F\fR\fR
111 .RS 20n
112 Force. Grabs the target process even if another process has control.
114 See \fBUSAGE\fR.
118 .ne 2
120 \fB\fB-l\fR\fR
122 .RS 20n
123 Shows unresolved dynamic linker map names.
127 .ne 2
129 \fB\fB-L\fR\fR
131 .RS 20n
132 Prints lgroup containing physical memory that backs virtual memory.
136 .ne 2
138 \fB\fB-r\fR\fR
140 .RS 20n
141 Prints the process's reserved addresses.
145 .ne 2
147 \fB\fB-s\fR\fR
149 .RS 20n
150 Prints \fBHAT\fR page size information.
154 .ne 2
156 \fB\fB-S\fR\fR
158 .RS 20n
159 Displays swap reservation information per mapping. See USAGE for more
160 information.
164 .ne 2
166 \fB\fB-x\fR\fR
168 .RS 20n
169 Displays additional information per mapping. See USAGE for more information.
172 .SH USAGE
174 The \fBpmap\fR utility prints information about the address space of a process.
176 .ne 2
178 \fBProcess Mappings\fR
180 .sp .6
181 .RS 4n
183 .in +2
185 /usr/bin/pmap [ -rslF ] [-A \fIaddress_range\fR] [ \fIpid\fR | \fIcore\fR ] ...
187 .in -2
190 By default, \fBpmap\fR displays all of the mappings in the virtual address
191 order they are mapped into the process. The mapping size, flags, and mapped
192 object name are shown.
194 The \fB-A\fR option can be used to limit the output to a specified address
195 range. The specified addresses are rounded up or down to a segment boundary and
196 the output includes the segments bounded by those addresses.
200 .ne 2
202 \fBProcess Lgroup Mappings\fR
204 .sp .6
205 .RS 4n
207 .in +2
209 /usr/bin/pmap -L [ -rslF ] [-A \fIaddress_range\fR] \fIpid\fR ...
211 .in -2
214 The \fB-L\fR option can be used to determine the lgroup containing the physical
215 memory backing the specified virtual memory. When used with the \fB-A\fR
216 option, the specified addresses are rounded up or down to a page boundary and
217 the output is limited to the page or pages bounded by those addresses.
219 This can be used in conjunction with \fBplgrp\fR(1) to discover whether the
220 home lgroup of a thread of interest is the same as where the memory is located
221 and whether there should be memory locality for the thread. The
222 \fBlgrpinfo\fR(1) command can also be useful with this \fBpmap\fR option. It
223 displays the lgroup hierarchy, contents, and characteristics which gives more
224 information about the lgroups that the memory is distributed across and their
225 relationship to each other and any other lgroups of interest.
227 In addition, the thread and memory placement can be changed by using
228 \fBplgrp\fR(1), \fBpmadvise\fR(1), or \fBmadv.so.1\fR(1).
232 .ne 2
234 \fBProcess anon/locked mapping details\fR
236 .sp .6
237 .RS 4n
239 .in +2
241 /usr/bin/pmap -x [ -aslF ] [-A \fIaddress_range\fR] [ \fIpid\fR | \fIcore\fR ] ...
243 .in -2
246 The \fB-x\fR option displays additional information per mapping. The size of
247 each mapping, the amount of resident physical memory (RSS), the amount of
248 anonymous memory, and the amount of memory locked is shown with this option.
249 This does not include anonymous memory taken by kernel address space due to
250 this process.
254 .ne 2
256 \fBSwap Reservations\fR
258 .sp .6
259 .RS 4n
261 .in +2
263 /usr/bin/pmap -S [ -alF ] [-A \fIaddress_range\fR] [ \fIpid\fR | \fIcore\fR ] ...
265 .in -2
268 The \fB-S\fR option displays swap reservation information per mapping.
273 Caution should be exercised when using the \fB-F\fR flag. Imposing two
274 controlling processes on one victim process can lead to chaos. Safety is
275 assured only if the primary controlling process, typically a debugger, has
276 stopped the victim process and the primary controlling process is doing nothing
277 at the moment of application of the \fBproc\fR tool in question.
278 .SH DISPLAY FORMATS
280 One line of output is printed for each mapping within the process, unless the
281 -\fB-s\fR or -\fB-L\fR option is specified. With \fB-s\fR option, one line is
282 printed for a contiguous mapping of each hardware translation page size. With
283 \fB-L\fR option one line is printed for a contiguous mapping belonging to the
284 same lgroup. With both \fB-L\fR and \fB-s\fR options, one line is printed for a
285 contiguous mapping of each hardware translation page size belonging to the same
286 lgroup. The column headings are shown in parentheses below.
288 .ne 2
290 \fBVirtual Address (\fBAddress\fR)\fR
292 .sp .6
293 .RS 4n
294 The first column of output represents the starting virtual address of each
295 mapping. Virtual addresses are displayed in ascending order.
299 .ne 2
301 \fBVirtual Mapping Size (\fBKbytes\fR)\fR
303 .sp .6
304 .RS 4n
305 The virtual size in kilobytes of each mapping.
309 .ne 2
311 \fBResident Physical Memory (\fBRSS\fR)\fR
313 .sp .6
314 .RS 4n
315 The amount of physical memory in kilobytes that is resident for each mapping,
316 including that which is shared with other address spaces.
320 .ne 2
322 \fBAnonymous Memory (\fBAnon\fR)\fR
324 .sp .6
325 .RS 4n
326 The number of pages, counted by using the system page size, of anonymous memory
327 associated with the specified mapping. Anonymous memory shared with other
328 address spaces is not included, unless the \fB-a\fR option is specified.
330 Anonymous memory is reported for the process heap, stack, for 'copy on write'
331 pages with mappings mapped with \fBMAP_PRIVATE\fR (see \fBmmap\fR(2)).
335 .ne 2
337 \fBLocked (\fBLocked\fR)\fR
339 .sp .6
340 .RS 4n
341 The number of pages locked within the mapping. Typical examples are memory
342 locked with \fBmlock()\fR and System V shared memory created with
343 \fBSHM_SHARE_MMU\fR.
347 .ne 2
349 \fBPermissions/Flags (\fBMode\fR)\fR
351 .sp .6
352 .RS 4n
353 The virtual memory permissions are shown for each mapping. Valid permissions
354 are:
356 .ne 2
358 \fB\fBr:\fR\fR
360 .RS 6n
361 The mapping can be read by the process.
365 .ne 2
367 \fB\fBw:\fR\fR
369 .RS 6n
370 The mapping can be written by the process.
374 .ne 2
376 \fB\fBx:\fR\fR
378 .RS 6n
379 Instructions that reside within the mapping can be executed by the process.
382 Flags showing additional information for each mapping can be displayed:
384 .ne 2
386 \fB\fBs:\fR\fR
388 .RS 6n
389 The mapping is shared such that changes made in the observed address space are
390 committed to the mapped file, and are visible from all other processes sharing
391 the mapping.
395 .ne 2
397 \fB\fBR:\fR\fR
399 .RS 6n
400 Swap space is not reserved for this mapping. Mappings created with
401 \fBMAP_NORESERVE\fR and System V \fBISM\fR shared memory mappings do not
402 reserve swap space.
406 .ne 2
408 \fB\fB*:\fR\fR
410 .RS 6n
411 The data for the mapping is not present in the core file (only applicable when
412 applied to a core file). See \fBcoreadm\fR(8) for information on configuring
413 core file content.
419 .ne 2
421 \fBLgroup (\fBLgrp\fR)\fR
423 .sp .6
424 .RS 4n
425 The lgroup containing the physical memory that backs the specified mapping.
429 .ne 2
431 \fBMapping Name (\fBMapped File\fR)\fR
433 .sp .6
434 .RS 4n
435 A descriptive name for each mapping. The following major types of names are
436 displayed for mappings:
437 .RS +4
439 .ie t \(bu
440 .el o
441 \fBA mapped file:\fR For mappings between a process and a file, the \fBpmap\fR
442 command attempts to resolve the file name for each mapping. If the file name
443 cannot be resolved, \fBpmap\fR displays the major and minor number of the
444 device containing the file, and the file system inode number of the file.
446 .RS +4
448 .ie t \(bu
449 .el o
450 \fBAnonymous memory:\fR Memory not relating to any named object or file within
451 the file system is reported as \fB[ anon ]\fR.
453 The \fBpmap\fR command displays common names for certain known anonymous memory
454 mappings:
458 .ne 2
460 \fB\fB[ heap ]\fR\fR
462 .RS 22n
463 The mapping is the process heap.
467 .ne 2
469 \fB\fB[ stack ]\fR\fR
471 .RS 22n
472 The mapping is the main stack.
476 .ne 2
478 \fB\fB[ stack tid=\fIn\fR ]\fR\fR
480 .RS 22n
481 The mapping is the stack for thread \fIn\fR.
485 .ne 2
487 \fB\fB[ altstack tid=\fIn\fR ]\fR\fR
489 .RS 22n
490 The mapping is used as the alternate signal stack for thread \fIn\fR.
495 If the common name for the mapping is unknown, \fBpmap\fR displays \fB[ anon
496 ]\fR as the mapping name.
498 .RS +4
500 .ie t \(bu
501 .el o
502 \fBSystem V Shared Memory:\fR Mappings created using System V shared memory
503 system calls are reported with the names shown below:
507 .ne 2
509 \fB\fBshmid=n:\fR\fR
511 .RS 17n
512 The mapping is a System V shared memory mapping. The shared memory identifier
513 that the mapping was created with is reported.
517 .ne 2
519 \fB\fBism shmid=n:\fR\fR
521 .RS 17n
522 The mapping is an "Intimate Shared Memory" variant of System V shared memory.
523 \fBISM\fR mappings are created with the \fBSHM_SHARE_MMU\fR flag set, in
524 accordance with \fBshmat\fR(2) (see \fBshmop\fR(2)).
528 .ne 2
530 \fB\fBdism shmid=n:\fR\fR
532 .RS 17n
533 The mapping is a pageable variant of \fBISM\fR. Pageable \fBISM\fR is created
534 with the \fBSHM_PAGEABLE\fR flag set in accordance with \fBshmat\fR(2) (see
535 \fBshmop\fR(2)).
541 .RS +4
543 .ie t \(bu
544 .el o
545 \fBOther:\fR Mappings of other objects, including devices such as frame
546 buffers. No mapping name is shown for other mapped objects.
551 .ne 2
553 \fBPage Size (\fBPgsz\fR)\fR
555 .sp .6
556 .RS 4n
557 The page size in kilobytes that is used for hardware address translation for
558 this mapping. See \fBmemcntl\fR(2) for further information.
562 .ne 2
564 \fBSwap Space (\fBSwap\fR)\fR
566 .sp .6
567 .RS 4n
568 The amount of swap space in kilobytes that is reserved for this mapping. That
569 is, swap space that is deducted from the total available pool of reservable
570 swap space that is displayed with the command \fBswap\fR \fB-s\fR. See
571 \fBswap\fR(8).
574 .SH EXAMPLES
576 \fBExample 1 \fRDisplaying Process Mappings
579 By default, \fBpmap\fR prints one line for each mapping within the address
580 space of the target process. The following example displays the address space
581 of a typical bourne shell:
584 .in +2
586 example$ pmap 102905
587 102905:    sh
588 00010000    192K r-x--  /usr/bin/ksh
589 00040000      8K rwx--  /usr/bin/ksh
590 00042000     40K rwx--    [ heap ]
591 FF180000    664K r-x--  /usr/lib/libc.so.1
592 FF236000     24K rwx--  /usr/lib/libc.so.1
593 FF23C000      8K rwx--  /usr/lib/libc.so.1
594 FF250000      8K rwx--    [ anon ]
595 FF260000     16K r-x--  /usr/lib/en_US.ISO8859-1.so.2
596 FF272000     16K rwx--  /usr/lib/en_US.ISO8859-1.so.2
597 FF280000    560K r-x--  /usr/lib/libnsl.so.1
598 FF31C000     32K rwx--  /usr/lib/libnsl.so.1
599 FF324000     32K rwx--  /usr/lib/libnsl.so.1
600 FF340000     16K r-x--  /usr/lib/libc_psr.so.1
601 FF350000     16K r-x--  /usr/lib/libmp.so.2
602 FF364000      8K rwx--  /usr/lib/libmp.so.2
603 FF3A0000      8K r-x--  /usr/lib/libdl.so.1
604 FF3B0000      8K rwx--    [ anon ]
605 FF3C0000    152K r-x--  /usr/lib/ld.so.1
606 FF3F6000      8K rwx--  /usr/lib/ld.so.1
607 FFBFC000     16K rw---    [ stack ]
608  total     1880K
610 .in -2
614 \fBExample 2 \fRDisplaying Memory Allocation and Mapping Types
617 The \fB-x\fR option can be used to provide information about the memory
618 allocation and mapping types per mapping. The amount of resident, non-shared
619 anonymous, and locked memory is shown for each mapping:
622 .in +2
624 example$ pmap -x 102908
625 102908:   sh
626 Address   Kbytes     RSS    Anon  Locked Mode   Mapped File
627 00010000      88      88       -       - r-x--  sh
628 00036000       8       8       8       - rwx--  sh
629 00038000      16      16      16       - rwx--    [ heap ]
630 FF260000      16      16       -       - r-x--  en_US.ISO8859-1.so.2
631 FF272000      16      16       -       - rwx--  en_US.ISO8859-1.so.2
632 FF280000     664     624       -       - r-x--  libc.so.1
633 FF336000      32      32       8       - rwx--  libc.so.1
634 FF360000      16      16       -       - r-x--  libc_psr.so.1
635 FF380000      24      24       -       - r-x--  libgen.so.1
636 FF396000       8       8       -       - rwx--  libgen.so.1
637 FF3A0000       8       8       -       - r-x--  libdl.so.1
638 FF3B0000       8       8       8       - rwx--    [ anon ]
639 FF3C0000     152     152       -       - r-x--  ld.so.1
640 FF3F6000       8       8       8       - rwx--  ld.so.1
641 FFBFE000       8       8       8       - rw---    [ stack ]
642 --------   -----   -----   -----   ------
643 total Kb    1072    1032      56       -
645 .in -2
650 The amount of incremental memory used by each additional instance of a process
651 can be estimated by using the resident and anonymous memory counts of each
652 mapping.
656 In the above example, the bourne shell has a resident memory size of
657 1032Kbytes. However, a large amount of the physical memory used by the shell is
658 shared with other instances of shell. Another identical instance of the shell
659 shares physical memory with the other shell where possible, and allocate
660 anonymous memory for any non-shared portion. In the above example, each
661 additional bourne shell uses approximately 56Kbytes of additional physical
662 memory.
666 A more complex example shows the output format for a process containing
667 different mapping types. In this example, the mappings are as follows:
670 .in +2
672 0001000: Executable text, mapped from 'maps' program
674 0002000: Executable data, mapped from 'maps' program
676 0002200: Program heap
679 0300000: A mapped file, mapped MAP_SHARED
680 0400000: A mapped file, mapped MAP_PRIVATE
682 0500000: A mapped file, mapped MAP_PRIVATE | MAP_NORESERVE
684 0600000: Anonymous memory, created by mapping /dev/zero
686 0700000: Anonymous memory, created by mapping /dev/zero
687          with MAP_NORESERVE
689 0800000: A DISM shared memory mapping, created with SHM_PAGEABLE
690          with 8MB locked via mlock(3C)
692 0900000: A DISM shared memory mapping, created with SHM_PAGEABLE,
693          with 4MB of its pages touched.
695 0A00000: A DISM shared memory mapping, created with SHM_PAGEABLE,
696          with none of its pages touched.
698 0B00000: An ISM shared memory mapping, created with SHM_SHARE_MMU
700 .in -2
704 .in +2
706 example$ pmap -x 15492
707 15492:  ./maps
708  Address  Kbytes     RSS    Anon  Locked Mode   Mapped File
709 00010000       8       8       -       - r-x--  maps
710 00020000       8       8       8       - rwx--  maps
711 00022000   20344   16248   16248       - rwx--    [ heap ]
712 03000000    1024    1024       -       - rw-s-  dev:0,2 ino:4628487
713 04000000    1024    1024     512       - rw---  dev:0,2 ino:4628487
714 05000000    1024    1024     512       - rw--R  dev:0,2 ino:4628487
715 06000000    1024    1024    1024       - rw---    [ anon ]
716 07000000     512     512     512       - rw--R    [ anon ]
717 08000000    8192    8192       -    8192 rwxs-    [ dism shmid=0x5]
718 09000000    8192    4096       -       - rwxs-    [ dism shmid=0x4]
719 0A000000    8192    8192       -    8192 rwxsR    [ ism shmid=0x2 ]
720 0B000000    8192    8192       -    8192 rwxsR    [ ism shmid=0x3 ]
721 FF280000     680     672       -       - r-x--  libc.so.1
722 FF33A000      32      32      32       - rwx--  libc.so.1
723 FF390000       8       8       -       - r-x--  libc_psr.so.1
724 FF3A0000       8       8       -       - r-x--  libdl.so.1
725 FF3B0000       8       8       8       - rwx--    [ anon ]
726 FF3C0000     152     152       -       - r-x--  ld.so.1
727 FF3F6000       8       8       8       - rwx--  ld.so.1
728 FFBFA000      24      24      24       - rwx--    [ stack ]
729 -------- ------- ------- ------- -------
730 total Kb   50464   42264   18888   16384
732 .in -2
736 \fBExample 3 \fRDisplaying Page Size Information
739 The \fB-s\fR option can be used to display the hardware translation page sizes
740 for each portion of the address space. (See \fBmemcntl\fR(2) for further
741 information on illumos multiple page size support).
745 In the example below, we can see that the majority of the mappings are using an
746 8K-Byte page size, while the heap is using a 4M-Byte page size.
750 Notice that non-contiguous regions of resident pages of the same page size are
751 reported as separate mappings. In the example below, the \fBlibc.so\fR library
752 is reported as separate mappings, since only some of the \fBlibc.so\fR text is
753 resident:
756 .in +2
758 example$ pmap -xs 15492
759 15492:  ./maps
760  Address  Kbytes     RSS    Anon  Locked Pgsz Mode   Mapped File
761 00010000       8       8       -       -   8K r-x--  maps
762 00020000       8       8       8       -   8K rwx--  maps
763 00022000    3960    3960    3960       -   8K rwx--    [ heap ]
764 00400000    8192    8192    8192       -   4M rwx--    [ heap ]
765 00C00000    4096       -       -       -    - rwx--    [ heap ]
766 01000000    4096    4096    4096       -   4M rwx--    [ heap ]
767 03000000    1024    1024       -       -   8K rw-s-  dev:0,2 ino:4628487
768 04000000     512     512     512       -   8K rw---  dev:0,2 ino:4628487
769 04080000     512     512       -       -    - rw---  dev:0,2 ino:4628487
770 05000000     512     512     512       -   8K rw--R  dev:0,2 ino:4628487
771 05080000     512     512       -       -    - rw--R  dev:0,2 ino:4628487
772 06000000    1024    1024    1024       -   8K rw---    [ anon ]
773 07000000     512     512     512       -   8K rw--R    [ anon ]
774 08000000    8192    8192       -    8192    - rwxs-    [ dism shmid=0x5 ]
775 09000000    4096    4096       -       -   8K rwxs-    [ dism shmid=0x4 ]
776 0A000000    4096       -       -       -    - rwxs-    [ dism shmid=0x2 ]
777 0B000000    8192    8192       -    8192   4M rwxsR    [ ism shmid=0x3 ]
778 FF280000     136     136       -       -   8K r-x--  libc.so.1
779 FF2A2000     120     120       -       -    - r-x--  libc.so.1
780 FF2C0000     128     128       -       -   8K r-x--  libc.so.1
781 FF2E0000     200     200       -       -    - r-x--  libc.so.1
782 FF312000      48      48       -       -   8K r-x--  libc.so.1
783 FF31E000      48      40       -       -    - r-x--  libc.so.1
784 FF33A000      32      32      32       -   8K rwx--  libc.so.1
785 FF390000       8       8       -       -   8K r-x--  libc_psr.so.1
786 FF3A0000       8       8       -       -   8K r-x--  libdl.so.1
787 FF3B0000       8       8       8       -   8K rwx--    [ anon ]
788 FF3C0000     152     152       -       -   8K r-x--  ld.so.1
789 FF3F6000       8       8       8       -   8K rwx--  ld.so.1
790 FFBFA000      24      24      24       -   8K rwx--    [ stack ]
791      -------- ------- ------- ------- -------
792 total Kb   50464   42264   18888   16384
794 .in -2
798 \fBExample 4 \fRDisplaying Swap Reservations
801 The \fB-S\fR option can be used to describe the swap reservations for a
802 process. The amount of swap space reserved is displayed for each mapping within
803 the process. Swap reservations are reported as zero for shared mappings, since
804 they are accounted for only once system wide.
807 .in +2
809 example$ pmap -S 15492
810 15492:  ./maps
811  Address  Kbytes    Swap Mode   Mapped File
812 00010000       8       - r-x--  maps
813 00020000       8       8 rwx--  maps
814 00022000   20344   20344 rwx--    [ heap ]
815 03000000    1024       - rw-s-  dev:0,2 ino:4628487
816 04000000    1024    1024 rw---  dev:0,2 ino:4628487
817 05000000    1024     512 rw--R  dev:0,2 ino:4628487
818 06000000    1024    1024 rw---    [ anon ]
819 07000000     512     512 rw--R    [ anon ]
820 08000000    8192       - rwxs-    [ dism shmid=0x5]
821 09000000    8192       - rwxs-    [ dism shmid=0x4]
822 0A000000    8192       - rwxs-    [ dism shmid=0x2]
823 0B000000    8192       - rwxsR    [ ism shmid=0x3]
824 FF280000     680       - r-x--  libc.so.1
825 FF33A000      32      32 rwx--  libc.so.1
826 FF390000       8       - r-x--  libc_psr.so.1
827 FF3A0000       8       - r-x--  libdl.so.1
828 FF3B0000       8       8 rwx--    [ anon ]
829 FF3C0000     152       - r-x--  ld.so.1
830 FF3F6000       8       8 rwx--  ld.so.1
831 FFBFA000      24      24 rwx--    [ stack ]
832 -------- ------- -------
833 total Kb   50464   23496
835 .in -2
840 The swap reservation information can be used to estimate the amount of virtual
841 swap used by each additional process. Each process consumes virtual swap from a
842 global virtual swap pool. Global swap reservations are reported by
843 the '\fBavail\fR' field of the \fBswap\fR(8) command.
846 \fBExample 5 \fRLabeling Stacks in a Multi-threaded Process
848 .in +2
850 example$ pmap 121969
851 121969: ./stacks
852 00010000       8K r-x--  /tmp/stacks
853 00020000       8K rwx--  /tmp/stacks
854 FE8FA000       8K rwx-R    [ stack tid=11 ]
855 FE9FA000       8K rwx-R    [ stack tid=10 ]
856 FEAFA000       8K rwx-R    [ stack tid=9 ]
857 FEBFA000       8K rwx-R    [ stack tid=8 ]
858 FECFA000       8K rwx-R    [ stack tid=7 ]
859 FEDFA000       8K rwx-R    [ stack tid=6 ]
860 FEEFA000       8K rwx-R    [ stack tid=5 ]
861 FEFFA000       8K rwx-R    [ stack tid=4 ]
862 FF0FA000       8K rwx-R    [ stack tid=3 ]
863 FF1FA000       8K rwx-R    [ stack tid=2 ]
864 FF200000      64K rw---    [ altstack tid=8 ]
865 FF220000      64K rw---    [ altstack tid=4 ]
866 FF240000     112K rw---    [ anon ]
867 FF260000      16K rw---    [ anon ]
868 FF270000      16K r-x--  /usr/platform/sun4u/lib/libc_psr.so.1
869 FF280000     672K r-x--  /usr/lib/libc.so.1
870 FF338000      24K rwx--  /usr/lib/libc.so.1
871 FF33E000       8K rwx--  /usr/lib/libc.so.1
872 FF35A000       8K rwxs-    [ anon ]
873 FF360000     104K r-x--  /usr/lib/libthread.so.1
874 FF38A000       8K rwx--  /usr/lib/libthread.so.1
875 FF38C000       8K rwx--  /usr/lib/libthread.so.1
876 FF3A0000       8K r-x--  /usr/lib/libdl.so.1
877 FF3B0000       8K rwx--    [ anon ]
878 FF3C0000     152K r-x--  /usr/lib/ld.so.1
879 FF3F6000       8K rwx--  /usr/lib/ld.so.1
880 FFBFA000      24K rwx--    [ stack ]
881  total      1400K
883 .in -2
887 \fBExample 6 \fRDisplaying lgroup Memory Allocation
890 The following example displays lgroup memory allocation by mapping:
893 .in +2
895 example$ pmap -L `pgrep nscd`
896 100095: /usr/sbin/nscd
897 00010000       8K r-x--   2 /usr/sbin/nscd
898 00012000      48K r-x--   1 /usr/sbin/nscd
899 0002E000       8K rwx--   2 /usr/sbin/nscd
900 00030000      16K rwx--   2   [ heap ]
901 00034000       8K rwx--   1   [ heap ]
902          .
903          .
904          .
905 FD80A000      24K rwx--   2   [ anon ]
906 FD820000       8K r-x--   2 /lib/libmd5.so.1
907 FD840000      16K r-x--   1 /lib/libmp.so.2
908 FD860000       8K r-x--   2 /usr/lib/straddr.so.2
909 FD872000       8K rwx--   1 /usr/lib/straddr.so.2
910 FD97A000       8K rw--R   1   [ stack tid=24 ]
911 FD990000       8K r-x--   2 /lib/nss_nis.so.1
912 FD992000      16K r-x--   1 /lib/nss_nis.so.1
913 FD9A6000       8K rwx--   1 /lib/nss_nis.so.1
914 FD9C0000       8K rwx--   2   [ anon ]
915 FD9D0000       8K r-x--   2 /lib/nss_files.so.1
916 FD9D2000      16K r-x--   1 /lib/nss_files.so.1
917 FD9E6000       8K rwx--   2 /lib/nss_files.so.1
918 FDAFA000       8K rw--R   2   [ stack tid=23 ]
919 FDBFA000       8K rw--R   1   [ stack tid=22 ]
920 FDCFA000       8K rw--R   1   [ stack tid=21 ]
921 FDDFA000       8K rw--R   1   [ stack tid=20 ]
922     .
923     .
924     .
925 FEFFA000       8K rw--R   1   [ stack tid=2 ]
926 FF000000       8K rwx--   2   [ anon ]
927 FF004000      16K rwx--   1   [ anon ]
928 FF00A000      16K rwx--   1   [ anon ]
929     .
930     .
931     .
932 FF3EE000       8K rwx--   2 /lib/ld.so.1
933 FFBFE000       8K rw---   2   [ stack ]
934  total      2968K
936 .in -2
939 .SH EXIT STATUS
941 The following exit values are returned:
943 .ne 2
945 \fB\fB0\fR\fR
947 .RS 12n
948 Successful operation.
952 .ne 2
954 \fBnon-zero\fR
956 .RS 12n
957 An error has occurred.
960 .SH FILES
961 .ne 2
963 \fB\fB/proc/*\fR\fR
965 .RS 19n
966 process files
970 .ne 2
972 \fB\fB/usr/proc/lib/*\fR\fR
974 .RS 19n
975 \fBproc\fR tools supporting files
978 .SH ATTRIBUTES
980 See \fBattributes\fR(5) for descriptions of the following attributes:
985 box;
986 c | c
987 l | l .
988 ATTRIBUTE TYPE  ATTRIBUTE VALUE
990 Interface Stability     See below.
995 The command syntax is Evolving. The \fB-L\fR option and the output formats are
996 Unstable.
997 .SH SEE ALSO
999 \fBldd\fR(1), \fBlgrpinfo\fR(1), \fBmadv.so.1\fR(1), \fBmdb\fR(1),
1000 \fBplgrp\fR(1), \fBpmadvise\fR(1), \fBproc\fR(1), \fBps\fR(1),
1001 \fBcoreadm\fR(8), \fBprstat\fR(8), \fBswap\fR(8), \fBmmap\fR(2),
1002 \fBmemcntl\fR(2), \fBmeminfo\fR(2), \fBshmop\fR(2), \fBdlopen\fR(3C),
1003 \fBproc\fR(4), \fBattributes\fR(5)