HP-UX Reference (11i v3 07/02) - 1M System Administration Commands N-Z (vol 4)

s
swapinfo(1M) swapinfo(1M)
When a process is created, or requests additional space, space is reserved for it by increasing the space
shown on the reserve line above. When paging activity actually occurs, space is used in one of the pag-
ing 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 allocating 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
memory line above. (Memory paging is controlled
by the tunable parameter
swapmem_on , which defaults to 1 (on). If this parameter is turned off, the
memory 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
swapinfo
:
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 completely
reserved or fully allocated.
Logical Volume Manager (LVM)
The
swapinfo 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 lvlnboot and lvrmboot
.For
example, to remove a swap logical volume, run the following LVM command:
lvrmboot -s
Options
swapinfo recognizes the following options:
-s In addition to printing information about device and file system paging space that are currently
in use,
swapinfo 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), swapinfo
-s
will not be able to display any information. In this case swapinfo -s will display the
error message - "Primary swap for next boot was not set using swapctl()"
-m Display the AVAIL, USED, FREE, START, LIMIT, and RESERVE values in Mbytes instead of
Kbytes, rounding off to the nearest whole Mbyte (multiples of 1024
2
). The output header format
changes from Kb to Mb accordingly.
-t Add a totals line with a TYPE of total. This line totals only the paging information displayed
above it, not all paging areas; this line might be misleading if a subset of -dfrM is specified.
-a Show all device paging areas, including those configured into the kernel but currently disabled.
(These are normally omitted.) The word disabled appears after the NAME, and the Kb
AVAIL, Kb USED, and Kb FREE values are 0. The -a option is ignored unless the -d option is
present or is true by default.
-d Print information about device paging areas only. This modifies the output header appropri-
ately.
434 Hewlett-Packard Company 3 HP-UX 11i Version 3: February 2007