swap(1M) SYSTEM ADMINISTRATION COMMANDS swap(1M)
NAME
swap - swap administrative interface
SYNOPSIS
/usr/sbin/swap -a swapname swaplow swaplen
/usr/sbin/swap -d swapname swaplow
/usr/sbin/swap -l
/usr/sbin/swap -s
DESCRIPTION
swap provides a method of adding, deleting, and monitoring
the system swap areas used by the memory manager. The fol-
lowing options are recognized:
-a Add the specified swap area. swapname is the name of
the block special partition, e.g., /dev/dsk/c1d0s1 or a
regular file. swaplow is the offset in 512-byte blocks
into the partition where the swap area should begin.
swaplen is the length of the swap area in 512-byte
blocks. If this length is SWAPFULLLENGTH, full parti-
tion (from the offset block) of the swap device is
used. The constant SWAP_FULLLENGTH is defined in
sys/swap.h. This option can only be used by the
super-user. If additional swap areas are added, it is
normally done during the system start up routine
/etc/rc when going into multi-user mode.
-d Delete the specified swap area. swapname is the name
of block special partition, e.g., /dev/dsk/c1d0s1 or a
regular file. swaplow is the offset in 512-byte blocks
into the the swap area to be deleted. Using this
option marks the swap area as ``INDEL'' (in the process
of being deleted). The system will not allocate any
new blocks from the area, and will try to free swap
blocks from it. The area will remain in use until all
blocks from it are freed. This option can be used only
by the super-user.
-l List the status of all the swap areas. The output has
five columns:
path The path name for the swap area.
dev The major/minor device number in decimal if it
is a block special device; zeros otherwise.
swaplo The swaplow value for the area in 512-byte
blocks.
blocks The swaplen value for the area in 512-byte
blocks.
1
swap(1M) SYSTEM ADMINISTRATION COMMANDS swap(1M)
free The number of free 512-byte blocks in the area.
If the swap area is being deleted, the word
INDEL will be printed to the right of this
number.
-s Print the following information about total swap space
usage:
allocated The amount of swap space (in 512-byte
blocks) allocated to private pages.
reserved The number of swap space (in 512-bytes
blocks) not currently allocated, but
claimed by memory mappings that have not
yet created private pages.
used The total amount of swap space, in 512-byte
blocks, that is either allocated or
reserved.
available The total swap space, in 512-byte blocks,
that is currently available for future
reservation and allocation.
Full swap partitions on local disks can be added automati-
cally at system startup time. This is done by creating an
entry in /etc/vfstab with the special field set to the name
of the disk partition, the fstype field set to ``swap,'' and
the automnt field set to ``no.''
FILES
/etc/vfstab
SEE ALSO
vfstab(4)
WARNINGS
No check is done to see if a swap area being added overlaps
with an existing file system.
2