swapinfo(1M)swapinfo(1M)NAMEswapinfo - system paging space information
SYNOPSISDESCRIPTION
prints information about device and file system paging space. also
prints information about primary paging device for next boot.
(Note: the term `swap' refers to an obsolete implementation of virtual
memory; HP-UX actually implements virtual memory by way of paging
rather than swapping. This command and others retain names derived
from `swap' for historical reasons.)
By default, prints to standard output a two line header as shown here,
followed by one line per paging area:
The fields are:
One of:
Paging space residing on a mass storage device,
either taking up the entire device or, if the
device contains a file system, taking up the
space between the end of the file system and the
end of the device. This space is exclusively
reserved for paging, and even if it is not being
used for paging, it cannot be used for any other
purpose. Device paging areas typically provide
the fastest paging.
Dynamic paging space available from a file system.
When this space is needed, the system creates
files in the file system and uses them as paging
space. File system paging is typically slower
than device paging, but allows the space to be
used for other things (user files) when not
needed for paging.
File system paging space (see
above) on a file system residing on a local
disk.
File system paging space (see
above) on a file system residing on another
machine. This file system would have been
mounted on the local machine via NFS.
Paging space on reserve.
This is the amount of paging space that could be
needed by processes that are currently running,
but that has not yet been allocated from one of
the above paging areas. See "Paging Allocation"
below.
Memory paging area (also known as pseudo-swap).
This is the amount of system memory that can be
used to hold pages in the event that all of the
above paging areas are used up. See "Paging
Allocation" below. This line appears only if
memory paging is enabled.
The total available space from the paging area,
in blocks of 1024 bytes (rounded to nearest whole block if
necessary), including any paging space already in use.
For file system paging areas the value is not necessarily
constant. It is the current space allocated for paging
(even if not currently used), plus the free blocks avail‐
able on the file system to ordinary users, minus RESERVE
(but never less than zero). AVAIL is never more than LIMIT
if LIMIT is non-zero. Since paging space is allocated in
large chunks, AVAIL is rounded down to the nearest full
allocation chunk.
For the memory paging area this value is also not necessar‐
ily constant, because it reflects allocation of memory by
the kernel as well as by processes that might need to be
paged.
The current number of 1-Kbyte blocks used for paging in the paging
area.
For the memory paging area, this count also includes memory
used for other purposes and thus unavailable for paging.
The amount of space that can be used for future paging. Usually this
is the difference between Kb AVAIL and Kb USED. There
could be a difference if some portion of a device paging
area is unusable, perhaps because the size of the paging
area is not a multiple of the allocation chunk size, or
because the tunable parameter is not set high enough.
The percentage of capacity in use, based on
Kb USED divided by Kb AVAIL; 100% if Kb AVAIL is zero.
For device paging areas,
START is the block address on the mass storage device of
the start of the paging area. The value is normally 0 for
devices dedicated to paging, or the end of the file system
for devices containing both a file system and paging space.
For file system paging areas, LIMIT is the maximum number
of 1-Kbyte blocks that will be used for paging, the same as
the limit value given to A file system LIMIT value of means
there is no fixed limit; all space is available except that
used for files, less the blocks represented by (see
tunefs(1M)) plus RESERVE.
For device paging areas, this value is always ``—''.
For file system paging areas, this value is the number of
1-Kbyte blocks reserved for file system use by ordinary
users, the same as the reserve value given to
The same as the
priority value given to This value indicates the order in
which space is taken from the devices and file systems used
for paging. Space is taken from areas with lower priority
values first. priority can have a value between 0 and 10.
See "Paging Allocation" below.
For device paging areas,
the block special file name whose major and minor numbers
match the device's ID. The command searches the tree to
find device names. If no matching block special file is
found, prints the device ID (major and minor values), for
example,
For file system swap areas, NAME is the name of a directory
on the file system in which the paging files are stored.
When used with -s option, also prints to standard output a three line
header as shown here, followed by one line for the primary paging area
configured for next boot:
The fields are:
swapon(1M) can configure primary paging area for next boot on a stor‐
age device only.
The paging space configured for next boot resides on a mass
storage device, either taking up the entire
device or, if the device contains a file system,
taking up the space between the end of the file
system and the end of the device.
For device paging areas, START is the block address on the
mass storage device of the start of the paging area. The
value is normally 0 for devices dedicated to paging, or the
end of the file system for devices containing both a file
system and paging space. This is same as the value given
to swapon(1M) when configuring primary paging area for next
boot.
LENGTH is the maximum number of blocks that will be used
for paging. This is same as the value given to swapon(1M)
when configuring primary paging area for next boot.
The block special file name whose major and minor numbers
match the device's ID. The command searches the tree to
find device names. If no matching block special file is
found, prints the device ID (major and minor values), for
example,
Paging Allocation
Paging areas are enabled at boot time (for device paging areas config‐
ured into the kernel) or by the command (see swapon(1M)), often invoked
by during system initialization based on the contents of When a paging
area is enabled, some portion of that area is allocated for paging
space. For device paging areas, the entire device is allocated, less
any leftover fraction of an allocation chunk. (The size of an alloca‐
tion chunk is controlled by the tunable parameter and is typically 2
MB.) For file system paging areas, the minimum value given to (rounded
up to the nearest allocation chunk) is allocated.
When a process is created, or requests additional space, space is
reserved for it by increasing the space shown on the line above. When
paging activity actually occurs, space is used in one of the paging
areas (the one with the lowest priority number that has free space
available, already allocated), and that space will be shown as used in
that area.
The sum of the space used in all of the paging areas, plus the amount
of space reserved, can never exceed the total amount allocated in all
of the paging areas. If a request for more memory occurs which would
cause this to happen, the system tries several options:
1. The system tries to increase the total space available by allocat‐
ing more space in file system paging areas.
2. If all file system paging areas are completely allocated and the
request is still not satisfied, the system will try to use memory
paging as described on the line above. (Memory paging is con‐
trolled by the tunable parameter which defaults to 1 (on). If
this parameter is turned off, the line will not appear.)
3. If memory paging also cannot satisfy the request, because it is
full or turned off, the request is denied.
Several implications of this procedure are noteworthy for understanding
the output of
· Paging space will not be allocated in a file system paging area
(except for the minimum specified when the area is first
enabled) until all device paging space has been reserved, even
if the file system paging area has a lower priority value.
· When paging space is allocated to a file system paging area,
that space becomes unavailable for user files, even if there is
no paging activity to it.
· Requests for more paging space will fail when they cannot be
satisfied by reserving device, file system, or memory paging,
even if some of the reserved paging space is not yet in use.
Thus it is possible for requests for more paging space to be
denied when some, or even all, of the paging areas show zero
usage — space in those areas is completely reserved.
· System available memory is shared between the paging subsystem
and kernel memory allocators. Thus, the system may show memory
paging usage before all available disk paging space is com‐
pletely reserved or fully allocated.
Logical Volume Manager (LVM)
The command displays swap logical volume if the system was installed
with LVM. To modify swap logical volume, refer to the LVM commands and
manpages for and For example, to remove a swap logical volume, run the
following LVM command:
Options
recognizes the following options:
In addition to printing information about device and file system
paging space that are currently in use, will also print
information about primary paging area configured for next
boot using swapon(1M).
If the primary paging area for next boot has not been
configured using swapon(1M), will not be able to display
any information. In this case will display the error mes‐
sage - "Primary swap for next boot was not set using
swapctl()"
Display the
AVAIL, USED, FREE, START, LIMIT, and RESERVE values in
Mbytes instead of Kbytes, rounding off to the nearest
whole Mbyte (multiples of The output header format
changes from to accordingly.
Add a totals line with a
TYPE of This line totals only the paging information dis‐
played above it, not all paging areas; this line might be
misleading if a subset of is specified.
Show all device paging areas,
including those configured into the kernel but currently
disabled. (These are normally omitted.) The word
appears after the NAME, and the Kb AVAIL, Kb USED, and Kb
FREE values are 0. The option is ignored unless the
option is present or is true by default.
Print information about device paging areas only.
This modifies the output header appropriately.
Print information about file system paging areas only.
This modifies the output header appropriately.
Categorize file system paging area information into
areas and areas, instead of calling them both areas.
Print information about reserved paging space only.
Print information about memory paging space only.
The and options can be combined. The default is
Quiet mode.
Print only a total "Kb AVAIL" value (with the option, Mb
AVAIL); that is, the total paging space available on the
system (device, file system, reserve, or memory paging
space only if or is specified), for possible use by pro‐
grams that want a quick total. If is specified, the and
options are ignored.
Print a warning about each device paging area that contains
wasted space;
that is, any device paging area whose allocated size is
less than its total size. This option is effective only
if is also specified or true by default.
RETURN VALUE
returns 0 if it completes successfully (including if any warnings are
issued), or 1 if it reports any errors.
DIAGNOSTICS
prints messages to standard error if it has any problems.
EXAMPLES
List all file system paging areas with a totals line:
WARNINGS
needs kernel access for some information. If the user does not have
appropriate privileges for kernel access, will print a warning and
assume that the defaults for that information have not been changed.
Users of must not rely on the exact field widths and spacing of its
output, as these will vary depending on the system, the release of HP-
UX, and the data to be displayed.
The information in this manual page about paging allocation and other
implementation details may change without warning; users should not
rely on the accuracy of this information.
AUTHOR
was developed by HP.
SEE ALSOlvlnboot(1M), lvrmboot(1M), swapon(1M), swapon(2), swapctl(2),
fstab(4).
swapinfo(1M)