Segment report
To print the segment report, specify the -S flag.
This report contains all the columns detailed in the common summary metrics as well as its own defined here:
- Vsid
- Indicates the virtual segment ID. Identifies a unique segment in the VMM.
- Esid
- Indicates the effective segment ID. The Esid is only valid when the segment belongs to only one process (i.e: only one address space). When provided, it indicates how the segment is used by the process. If the Vsid segment is mapped by several processes (i.e: several address spaces), then this field contains - (hyphen). The exact Esid values can be obtained through the -P flag applied on each of the process identifiers using the segment. A - (hyphen) also displays for segments used to manage open files or multi-threaded structures because these segments are not part of the user address space of the process.
- Type
- Identifies the type of the segment:
- pers indicates a persistent segment
- work indicates a working segment
- clnt indicates a client segment
- mmap indicates a mapped segment
- rmap indicates a real memory mapping segment
- Description
- Gives a textual description of the segment. The content of this
column depends on the segment type and usage.
If the segment is a persistent segment and is not associated with a log, then the device name and i-node number of the associated file are displayed, separated by a colon. The device name and i-node can be translated into a file name with the ncheck command or by using the -O filename=on flag. If the segment is the primary segment of a large file, then the words
large file
are prepended to the description. - PSize
- Indicates the size of the pages inside the segment.
- Mapping device name and inode number to file names can be a lengthy operation for deeply nested file systems. Because of that, the -O filename=on option should be used with caution.
- If the segment is a persistent segment and is associated with a log, then the string log displays. If the segment is a working segment, then the svmon command attempts to determine the role of the segment. For instance, special working segments such as the kernel and shared library are recognized by the svmon command. If the segment is the private data segment for a process, then private prints out. If the segment is the code segment for a process, and the segment report prints out in response to the -P flag, then the string code is prepended to the description.
- If the segment is mapped by several processes and used in different ways (that is, a process private segment mapped as shared memory by another process), then the description is empty. The exact description can be obtained through -P flag applied on each process identifier using the segment.
- If a segment description is too large to fit in the description space, then the description is truncated. If you need to enlarge the output you can use the -O format flag. When set to -O format=160, the report is displayed in 160 columns, which means more room for the description field. When set to -O format=nolimit, the description will be fully printed even if it brakes the column alignment.
- Segment reports can only be generated for primary segments.
Examples:
- To display information about a list of segments including the
list of processes using them, enter:
# svmon -S 11c02 3393e5 2c10da 2c4158 1b1a34 -O pidlist=on
Unit: page Vsid Esid Type Description PSize Inuse Pin Pgsp Virtual 11c02 - work kernel heap s 65536 0 0 65536 System segment 3393e5 3 work working storage s 10143 0 0 10143 pid(s)=168138 2c4158 - work s 5632 5632 0 5632 System segment 1b1a34 - work L 2 2 0 2 Unattached segment 2c10da - clnt /dev/hd2:4183 s 2110 0 - - Unused segment
Information about each segment in the list is displayed. The Esid column contains information only when -O pidlist=on is specified because the
Esid
has a meaning only in the address space of a process. In this case, since the segment 3393e5 belongs to the process 168138, the Esid is reported, in all other cases no information is displayed. The segments 11c02 is the kernel pinned heap. The segment 2c4158 has no special characteristics. The segment 2c10da is relative to a file whose device is /dev/hd2 and whose inode number is 4183. The Paging space and Virtual fields of the segment 2c10da are not meaningful (because it is a client segment). The segment 1b1a34 is a 16 MB page segment which contains 2 pages of 16 MB (equivalent to 8192 pages of 4KB). - To display information about all unattached segments in the system,
enter:
# svmon -S -O filtercat=unattached
Unit: page Vsid Esid Type Description PSize Inuse Pin Pgsp Virtual 1b1a34 - work L 2 2 0 2 2618ce - work s 1 0 0 1
In this example, the report contains all the segments coming from processes which have allocated shared memory areas, and which have exited without freeing these memory areas.
- To display the top 10 (in real memory consumption or sorted by
the inuse field) text segments with their corresponding file name,
enter:
# svmon -S -t 10 -O unit=auto,filterprop=text,filename=on
Unit: auto Vsid Esid Type Description PSize Inuse Pin Pgsp Virtual 1a0cb - clnt /dev/hd2:4140 s 7.62M 0K - - /usr/ccs/lib/libc.a a37b - clnt /dev/hd2:65692 s 4.34M 0K - - /usr/java5/jre/bin/libj9jit23.so 1150 - clnt /dev/hd2:16394 s 3.77M 0K - - /usr/lpp/xlC/lib/aix61/libC.a 16667 - clnt /dev/hd2:2716 s 3.10M 0K - - /usr/bin/ptxtstoverflow_heap 14285 - clnt /dev/hd2:131333 s 2.91M 0K - - /opt/rsct/lib/libct_rmf.a 8159 - clnt /dev/hd2:9535 s 2.52M 0K - - /usr/lib/drivers/nfs.ext 1b2ca - clnt /dev/hd2:65747 s 2.27M 0K - - /usr/java5/jre/lib/core.jar f23e - clnt /dev/hd2:115081 s 1.88M 0K - - /usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/libperl. 17026 - clnt /dev/hd2:8470 s 1.79M 0K - - /usr/lib/boot/unix_64 15104 - clnt /dev/hd2:2258 s 1.41M 0K - - /usr/lib/libdns_nonsecure.a
The -O filename=on option allows in this case to display the filename of each client text segment. The amount of memory used by every segment is put with the unit identifier because of the -O unit=auto option. The segment 1a0cb holds 7.62MB of real memory and no pinned memory. The paging space and virtual memory are meaningless for client segments. The Description of the segment f23e is truncated because the default format of the report is 80 columns. The -O format=180 or -O format=nolimit could be used to display the full path of this file.