[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
AIX Version 4.3 Commands Reference, Volume 5
svmon Command
Purpose
Captures and analyzes a snapshot
of virtual memory.
svmon [ -G ] [ -P [ n | s | a ]
[ pid1 ... pidN ] ] [ -P [ n | s | a ]
{ u | p | g | r }
[ Count ] ] [ -S sid1 ...
sidN ] [ -S
{ [ n | s | a ]
[ u | p | g | r ] }
[ Count ] ] [ -D sid1 ... sidN ]
[ -i Interval [ NumIntervals ] ]
[ -r ]
Description
The svmon command displays
information about the current state of memory. The displayed
information does not constitute a true snapshot of memory,
because the svmon command runs at user level with
interrupts enabled.
Reports
The svmon command creates
four types of reports: global, process, segment, and detailed
segment. Each report type is described here. Unless otherwise
noted, all statistics are in units of 4096-byte pages.
Global Report
The global report is printed when
the -G flag is specified. The column headings in a global
report are:
- memory
- Specifies statistics describing the use of real memory,
including:
- size
- Number of real memory frames (size of real
memory)
Note: This
includes any free frames that have been made
unusable by the memory sizing tool, the rmss
command.
- inuse
- Number of frames containing pages
- free
- Number of frames free
Note: This
includes any free frames that have been made
unusable by the memory sizing tool, the rmss
command.
- pin
- Number of frames containing pinned pages
- in use
- Specifies statistics on the subset of real memory in use,
including:
- work
- Number of frames containing pages from working
segments
- pers
- Number of frames containing pages from persistent
segments
- clnt
- Number of frames containing pages from client
segments
- pin
- Specifies statistics on the subset of real memory
containing pinned pages, including:
- work
- Number of frames containing pinned pages from
working segments
- pers
- Number of frames containing pinned pages from
persistent segments
- clnt
- Number of frames containing pinned pages from
client segments
- pg space
- Specifies statistics describing the use of paging space.
This data is reported only if the -r flag is not
used.
- size
- Size of paging space
- inuse
- Number of paging space pages in use
- ref
- Specifies the number of real memory frames that have been
recently referenced (reference bits are set). This data
is reported only if the -r flag is used.
- inuse
- Number of frames in use that have been recently
referenced
- pin
- Number of pinned frames that have been recently
referenced
Note: The rmss
command works by stealing free frames and making them
unusable by the VMM. If the rmss command has made any
frames unusable, the number of frames made unusable will be
displayed following the global report, as follows:
*
* Rmss has made 4036 free frames unusable.
*
If the svmon command is invoked to repeat the global
report at regular intervals (see the -i flag description),
the number of frames that the rmss
command has made unusable will be displayed only when the rmss
command has changed the number of unusable frames.
Process Report
The process report is the first
report printed out when the -P flag is specified. The
column headings in a process report are:
- Pid
- Indicates the process ID.
- Command
- Indicates the command the process is running.
- Inuse
- Indicates the total number of pages in real memory from
segments that are used by the process.
Note: A segment
can be used by multiple processes. Each page in real
memory from such a segment is accounted for in the Inuse
field for each process that uses the segment. The
total of the Inuse fields over all
active processes may exceed the total number of pages
in real memory.
- Pin
- Indicates the total number of pages pinned from segments
that are used by the process.
Note: A segment
can be used by multiple processes. Each page pinned
from such a segment is accounted for in the Pin
field for each process that uses the segment. The
total of the Pin fields over all active
processes may exceed the total number of pages
pinned.
- Pgspace
- Indicates the total number of pages used on paging space
by segments that are used by the process. This number is
reported only if the -r flag is not used.
Note: A segment
can be used by multiple processes. Each page on
paging space from such a segment is accounted for in
the Pgspace field for each process that
uses the segment. The total of the Pgspace
fields over all active processes may exceed the total
number of pages on paging space.
- Ref/Inuse
- Contains the total number of pages in real memory with
reference bits set to 1 and from segments used by the
process. This number indicates how many pinned pages are
being actively used, as opposed to residing in memory.
This number is reported only if the -r flag is
used.
Note: A
segment can be used by multiple processes. Since each
page from such a segment is accounted for in the Ref/Use
field for each process that uses the segment, a
single segment may be counted multiple times.
Therefore, the value of the Ref/Use
field, including all active processes, may exceed the
total number of pinned pages with reference bits set
to 1.
- Ref/Pin
- Contains the number of pinned pages with reference bits
set to 1 and from segments used by the process. This
number indicates how many pinned pages are being actively
used, as opposed to residing unused in memory. This
number is reported only if the -r flag is used.
Note: A
segment may be used by multiple processes. Since each
page from such a segment is accounted for in the Ref/Pin
field for each process that uses the segment, a
single segment may be counted multiple times.
Therefore, the value of the Ref/Pin
field, including all active processes, may exceed the
total number of pinned pages with reference bits set
to 1.
Segment Report
The segment report is printed out
when the -S flag is specified. This report is printed for
each process when the -P flag is specified. Its column
headings are described as follows:
- Segid
- Indicates the segment ID.
- Type
- Identifies the type of the segment: pers
indicates a persistent segment, work
indicates a working segment, clnt indicates
a client segment, and mmap indicates a mapped segment.
- Description
- Specifies a textual description of the segment. The value
of this column depends on the segment type. 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.)
If the segment is a persistent
segment and is associated with a log, then the string log
is displayed. 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 is
printed out. If the segment is the code segment for a
process, and the segment report is printed out in
response to the -P flag, then the word code
is prepended to the description.
- Inuse
- Indicates the number of pages in real memory from this
segment.
- Pin
- Indicates the number of pages pinned from this segment.
- Pgspace
- Indicates the number of pages used on paging space by
this segment. This field is relevant only for working
segments. This field is present only if the -r
flag is not specified.
- Address Range
- Specifies one range for a persistent or client segment
and two ranges for a working segment. The range for a
persistent or client segment takes the form 0..x,
where x specifies the maximum virtual pages
used. A working segment has two ranges because space is
allocated by starting from both ends and working towards
the middle. The low range starts at page 0
and grows upward, while the high range starts at page 65535
and grows downward.
So,
the Address Range field for a working
segment has the form 0..x : y..65535,
where x is the maximum page number that has
been used in the lower range, and y is the
minimum page number that has been used in the higher
range. If the working segment is the private segment for
a process, then the low range contains global data for
the process, while the high range contains the process
stack and other system-related data.
If the working segment
is not private (for instance, a kernel or a shared
library), space is allocated differently, and the Address
Range field is more difficult to interpret. This
field is present only if the -r flag is not used.
- Ref/Inuse
- Contains the number of pages from the segment that are in
real memory and have reference bits set to 1. This number
indicates how many pages are being actively used, as
opposed to residing unused in memory. This field is
present only if the -r flag is used.
- Ref/Pin
- Contains the number of pinned frames associated with the
segment that have reference bits set to 1. This number
indicates how many pinned pages are being actively
used, as opposed to residing unused in memory. This field
is present only if the -r flag is used.
Detailed Segment Report
The detailed segment report is
printed when the -D flag is specified. This report
consists of several lines that give general information about the
segment, followed by a table in which each row gives information
about a page from the segment that resides in real memory. The
general segment information, and subsequent table, are described
as follows.
- Segid
- Indicates the segment ID.
- Type
- Identifies the type of the segment. The persistent
field indicates a persistent segment, the working
field indicates a working segment, and the client
field indicates a client segment.
- Description
- Specifies a textual description of the segment. The value
of this column depends on the segment type. 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.)
If the segment is a persistent
segment and is associated with a log, then the string log
is displayed. 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, and described as such. If the
segment is the private data segment for a process, then private
is printed out.
- Address Range
- Specifies one range for a persistent or client segment,
and two ranges for a working segment. The range for a
persistent or client segment takes the form 0..x,
where x specifies the maximum virtual pages
used. A working segment has two ranges because space is
allocated by starting from both ends and working towards
the middle. The low range starts at page 0
and grows upward, while the high range starts at page 65535
and grows downward.
So,
the Address Range field for a working
segment has the form 0..x : y..65535,
where x is the maximum page number that has
been used in the lower range, and y is the
minimum page number that has been used in the higher
range. If the working segment is the private segment for
a process, then the low range contains global data for
the process, while the high range contains the process
stack and other system-related data.
If the working segment
is not private (for instance, a kernel or a shared
library), space is allocated differently, and the Address
Range field is more difficult to interpret.
- Inuse
- Indicates the number of pages in real memory from this
segment. This value is also translated from 4096-byte
pages into megabytes and printed enclosed in parentheses.
- Pages in real memory:
-
- Page
- Specifies the index of the page within the segment.
- Frame
- Specifies the index of the real memory frame that the
page resides in.
- Pin
- Specifies a flag indicating whether the page is pinned.
The field contains pin if the page is
pinned; otherwise, the field is empty.
- Ref
- Specifies a flag indicating whether the page's reference
bit is on. The field contains ref if the
page's reference bit is on; otherwise, the field is
empty.
- Mod
- Specifies a flag indicating whether the page is modified.
The field contains mod if the page is
modified; otherwise, the field is empty.
Flags
Any combination of the following
command line arguments can be specified, except that the -i flag can be
specified only once. If no command line argument is given, then
the -G flag is implicit.
- -D sid1 ... sidN
- Displays detailed memory-usage statistics for segments sid1
... sidN. If N sids are specified, then N
detailed segment reports are displayed.
- -G
- Displays a global report.
- -i Interval [ NumIntervals
]
- Instructs the svmon command to print statistics
out repetitively. Statistics are collected and printed
every Interval seconds.
Note: Because
it may take a few seconds to collect statistics for
some options, the observed interval may be larger
than the specified interval. NumIntervals is
the number of repetitions; if not specified, the svmon
command will run until stopped.
- -P [ n|s|a
] [ pid1 ... pidN ]
- Displays memory usage statistics for processes pid1
... pidN. If no process IDs (PIDs) are specified,
then memory usage statistics are displayed for all active
processes. The -P flag should be immediately
followed by one of the following arguments:
- n
- Indicates that only non-system segments are to be
included in the statistics.
- s
- Indicates that only system (kernel) segments are
to be included in the statistics.
- a
- Indicates that both non-system and system
segments are to be included in the statistics.
If n, s, or
a is not specified, then n is implicit.
If N PIDs are
specified, then N + 1 reports are printed. The
first report is a process report that gives a summary of
memory usage for each process. Subsequent reports of this
type are segment reports that give a breakdown of memory
usage by segment for each specified process. For each
process, the PID and command are repeated, before that
process' segment report is printed out.
- -P [ n|s|a
] { u|p|g|r } [ Count
]
- Sorts processes by memory usage and displays the memory
usage statistics for the top Count processes. If a
Count value is not specified, then memory usage
statistics are displayed for all active processes. The -P
flag should be immediately followed by one of the
following arguments:
- n
- Indicates that only non-system segments are to be
included in the statistics.
- s
- Indicates that only system segments are to be
included in the statistics.
- a
- Indicates that both non-system and system
segments are to be included in the statistics.
If n, s, or
a is not specified, then n is implicit.
Next, one of the
following arguments must be specified:
- u
- Indicates that the processes are to be sorted in
decreasing order by the total number of pages in
real memory from segments used by a process.
- p
- Indicates that the processes are to be sorted in
decreasing order by the total number of pages
pinned from segments used by a process.
- g
- Indicates that the processes are to be sorted in
decreasing order by the total number of pages
used on paging space by segments used by a
process.
- r
- Indicates that the processes are to be sorted in
decreasing order by the total number of recently
referenced pages in segments that are used by the
process.
Note: The r
option requires use of the -r flag. The g
option cannot be used if the -r flag is
specified.
Count + 1 reports
are printed. The first report is a process report that
gives a summary of memory usage for each process.
Subsequent reports of this type are segment reports that
give a breakdown of memory usage, by segment, for each
process. For each process, the PID and command are
repeated before that process' segment report is printed.
- -r
- Displays statistics about the number of real memory
frames with reference bits on. The reference bit is used
in the Virtual Memory Manager (VMM) page-stealing
algorithm. When the -r flag is specified, page
space and address range statistics are replaced by
statistics about the number of frames in use that have
been recently referenced, and the number of pinned frames
that have been recently referenced.
For global reports, the page
space size and inuse fields are
replaced by referenced inuse and pin
fields.
For segment reports, the PGspace
and Address Range fields are replaced by Ref/Inuse
and Ref/Pin fields. For process reports, the
Pgspace field is replaced by two fields, Ref/Inuse
and Ref/Pin. No change is made for detailed
segment reports. When the -r flag is specified
with the -i (interval) flag, the reference bits on
all memory frames are reset after each iteration. Thus,
these fields contain data on the number of frames
referenced since the last iteration. This could have side
effects on system performance.
- -S sid1 ... sidN
- Displays memory-usage statistics for segments sid1 ...
sidN. One segment report is printed.
- -S { [n|s|a
] [ u|p|g|r ] } [ Count
]
- Sorts segments by memory usage and displays the memory
usage statistics for the top Count segments. If Count
is not specified, then a Count of 10 is implicit.
The -S flag should be immediately followed by one
these arguments:
- n
- Indicates that only non-system segments are to be
included in the statistics.
- s
- Indicates that only system segments are to be
included in the statistics.
- a
- Indicates that both non-system and system
segments are to be included in the statistics.
If none of n, s,
or a are specified, then n is implicit.
Next, one of the
following arguments must be specified:
- u
- Indicates that the segments are to be sorted in
decreasing order by the number of pages in real
memory.
- p
- Indicates that the segments are to be sorted in
decreasing order by the number of pages pinned.
- g
- Indicates that the segments are to be sorted in
decreasing order by the number of pages used on
paging space.
- r
- Indicates that the segments are to be sorted in
decreasing order by the number of pages recently
referenced.
Note: The r
option requires use of the -r flag. The g
option cannot be used if the -r flag is
specified.
If u, p, g,
or r is not specified, then u is implicit.
One option from either the [n|s|a]
or [u|p|g|r] group must be
specified. One segment report is printed.
Note: When invoked with
the -P, -S, or -D flag, the svmon
command pages in the u-block for each process, if the u-block
is not already resident in real memory. A process' u-block
contains information that is used by the kernel to properly
maintain the process. The u-block structure is approximately
six pages in size and resides in the private segment for each
process.
Security
Access Control: You must have
root authority to run this command.
Examples
- To print out global
statistics, enter:
svmon -G
- To print out the memory usage
statistics for all processes (that is, to limit
statistics to non-system segments), enter:
svmon -Pn
- To print out the memory usage
statistics for processes 6746 and 10078
(that is, to include statistics on all segments), enter:
svmon -Pa 6746 10078
- To sort system segments by
the number of pages in real memory, and print out the top
10 segments of the resulting list, enter:
svmon -Ssu 10
- To print detailed memory
usage statistics on segment 340d, enter:
svmon -D 340d
- To print out the global
statistics, repeated 10 times at 30-second intervals,
enter:
svmon -G -i 30 10
Related Information
The ncheck command, rmss command.
Logical Volume Storage Overview, Paging Space Overview in AIX Version 4
System Management Guide: Operating System and Devices.
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]