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
AVAILABILITY
SUNWcsr
DESCRIPTION
swap provides a method of adding, deleting, and monitoring the system swap areas used by the memory manager.
OPTIONS
−a Add the specified swap area. This option can only be used by the super-user. swapname is the name of the swap file: for example, /dev/dsk/c0t0dos1 or a regular file. swaplow is the offset in 512-byte blocks into the file where the swap area should begin. swaplen is the desired length of the swap area in 512-byte blocks. swaplow + swaplen must be less than or equal to the size of the swap file. If swaplen is not specified, an area will be added starting at swaplow and extending to the end of the designated file. If neither swaplow nor swaplen are specified, the whole file will be used except for the first 8 blocks. Swap areas are normally added automatically during system startup by the /sbin/swapadd script. This script adds all swap areas which have been specified in the /etc/vfstab file; for the syntax of these specifications, see vfstab(4).
−d Delete the specified swap area. This option can only be used by the super-user. swapname is the name of the swap file: for example, /dev/dsk/c0t0d0s1 or a regular file. swaplow is the offset in 512-byte blocks into the swap area to be deleted. If swaplow is not specified, the area will be deleted starting at block 8. When the command completes, swap blocks can no longer be allocated from this area and all swap blocks previously in use in this swap area have been moved to other swap areas.
−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; zeroes otherwise.
swaplo The swaplow value for the area in 512-byte blocks.
blocks The swaplen value for the area in 512-byte blocks.
free The number of 512-byte blocks in this area that are not currently allocated.
The first entry in this list will always be swapfs, the virtual swap area which the system boots on. Because swapfs encompasses all the physical swap areas in the system (if any), plus most of the physical memory of the machine (which it treats as usable swap space), the size of swapfs will always be greater than the sum of all the physical swap areas in the system.
−s Print summary information about total swap space usage and availability:
allocated The total amount of swap space (in 1024-byte blocks) currently allocated for use as backing store.
reserved The total amount of swap space (in 1024-bytes blocks) not currently allocated, but claimed by memory mappings for possible future use.
used The total amount of swap space (in 1024-byte blocks) that is either allocated or reserved.
available The total swap space (in 1024-byte blocks) that is currently available for future reservation and allocation.
These numbers include swap space in the form of physical memory made available to the system by swapfs.
SEE ALSO
WARNINGS
No check is done to see if a swap area being added overlaps with an existing file system.
SunOS 5.1/SPARC — Last change: 14 Sep 1992