'\"macro stdmacro
.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
.if n .pH g1a.swap @(#)swap	40.11 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} swap 1M "" "\&"
.if \nX=1 .ds x} swap 1M ""
.if \nX=2 .ds x} swap 1M "" "\&"
.if \nX=3 .ds x} swap "" "" "\&"
.TH \*(x}
.SH NAME
\f4swap\f1 \- swap administrative interface
.SH SYNOPSIS
\f4/usr/sbin/swap \-a\f1
\f2swapname swaplow swaplen\f1
.br
\f4/usr/sbin/swap \-d\f1
\f2swapname swaplow\f1
.br
\f4/usr/sbin/swap \-l\f1 [ \f4\-s\f1 ]
.br
\f4/usr/sbin/swap \-s\f1
.SH DESCRIPTION
\f4swap\fP provides a method of adding, deleting, and monitoring
the system swap areas used by the memory manager.
The following options are recognized:
.TP 5
\f4\-a\f1
Add the specified swap area.
\f2swapname\f1 is the name of the block special partition, e.g.,
\f4/dev/dsk/c1d0s1\f1 or a regular file.
\f2swaplow\f1 is the offset in 512-byte blocks into the
partition where the swap area should begin.
\f2swaplen\f1 is the length of the swap area in 512-byte blocks.
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 \f4/etc/rc\f1 when going
into multi-user mode.
.TP
\f4\-d\f1
Delete the specified swap area.
\f2swapname\f1 is the name of block special partition, e.g.,
\f4/dev/dsk/c1d0s1\f1 or a regular file.
\f2swaplow\f1 is the offset in 512-byte blocks into the
the swap area to be deleted.
Using this option marks the swap area as ``\s-1INDEL\s+1''
(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.
.TP
\f4\-l\f1
List the status of all the swap areas.
The output has five columns:
.RS 5
.TP 8
.SM
\f4path\f1
The path name for the swap area.
.TP
.SM
\f4dev\f1
The major/minor device number in decimal if it is a block special
device; zeros otherwise.
.TP
.SM
\f4swaplo\f1
The \f2swaplow\f1 value for the area in 512-byte blocks.
.TP
.SM
\f4blocks\f1
The \f2swaplen\f1 value for the area in 512-byte blocks.
.TP
.SM
\f4free\f1
The number of free 512-byte blocks in the area.
If the swap area is being deleted, the word
\s-1INDEL\s+1 will be printed to the right of this number.
.RE
.TP
\f4\-s\f1
Print the following information about total swap space usage:
.RS
.TP 12
\f4allocated\f1
The amount of swap space (in 512-byte blocks) allocated to
private pages.
.TP
\f4reserved\f1
The number of swap space (in 512-bytes blocks) not currently
allocated, but claimed by memory mappings that have
not yet created private pages.
.TP
\f4used\f1
The total amount of swap space, in 512-byte blocks, that is
either allocated or reserved.
.TP
\f4available\f1
The total swap space, in 512-byte blocks, that is currently
available for future reservation and allocation.
.RE
.SH WARNINGS
No check is done to see if a swap area being added
overlaps with an existing file system.
.Ee
