*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> swapon (8)              



NAME    [Toc]    [Back]

     swapctl, swapon - system swap management tool

SYNOPSIS    [Toc]    [Back]

     swapctl -A [-p priority] [-t blk|noblk]
     swapctl -a [-p priority] path
     swapctl -c -p priority path
     swapctl -d path
     swapctl -l | -s [-k]
     swapon -a | path

DESCRIPTION    [Toc]    [Back]

     The swapctl program adds,  removes,  lists  and  prioritizes
swap devices and
     files  for  the system.  The swapon program acts the same as
the swapctl
     program, as if called with the -a option, except  if  swapon
itself is
     called  with  -a,  in which case swapon acts as swapctl with
the -A option.

     Note: The initial swap device (root disk,  partition  b)  is
handled automatically
  by  the  kernel  and does not need to be added to
/etc/fstab or
     added via swapctl.  It will show up as "swap_device" in  the
output displayed
 with the -l flag.

     The options are as follows:

     -A       This  option  causes swapctl to read the /etc/fstab
file for devices
 and files with an ``sw'' type,  and  adds  all
these entries
             as swap devices.  If no swap devices are configured,
swapctl will
             exit with an error code.

     -a      The -a option requires that a path also  be  in  the
argument list.
             The  path  is added to the kernel's list of swap devices using the
             swapctl(2) system call.  When using the swapon  form
of this command,
  the  -a  option is treated the same as the -A
option, for
             backwards compatibility.

     -c      The -c option changes the  priority  of  the  listed
swap device or

     -d path
             The  -d option removes the listed path from the kernel's list of
             swap devices or files.

     -l      The -l option lists the  current  swap  devices  and
files, and their
             usage statistics.

     -s      The -s option displays a single line summary of current swap

     -p priority
             The -p option sets the priority of swap  devices  or
files to the
             priority  argument.   This works with the -a, -c and
-l options.

     -k      The -k option uses 1024 byte blocks instead  of  the
default 512

     -t blk|noblk
             This  flag  modifies  the function of the -A option.
The -t option
             allows the type of device to add  to  be  specified.
An argument of
             blk  causes  all  block  devices in /etc/fstab to be
added.  An argument
  of  noblk  causes  all  non-block  devices  in
/etc/fstab to be
             added.  This option is useful in early system startup, where
             swapping may be needed before all file  systems  are
             such as during disk checks of large file systems.

SWAP OPTIONS    [Toc]    [Back]

     When  parsing  the  /etc/fstab  file for swap devices, lines
such as the following
 specify additional swap devices:

           /dev/sd1b none swap sw 0 0

     Additional flags include:

     priority=N      This option sets the priority of the  specified swap device
  to N.  The highest priority is 0, second priority is
                     1, etc.
     nfsmntpt=/path  This option is useful for  swapping  to  NFS
files.  It
                     specifies  the local mount point to mount an
NFS filesystem.
  Typically, once this  mount  has  succeeded, the file
                     to be used for swapping on will be available
under this
                     point mount.  For example:

                     server:/export/swap/client none swap  sw,nfsmntpt=/swap

WARNINGS    [Toc]    [Back]

     Local  and  remote swap files cannot be configured until the
file systems
     they reside on are mounted read/write.  The  system  startup
scripts need
     to  fsck(8)  all  local file systems before this can happen.
This process
     requires substantial amounts of memory on some systems.   If
one configures
 no local block swap devices on a machine that has local
file systems
     to check and rely only on swap files, the machine will  have
no swap space
     at all during system fsck(8) and may run out of real memory,
causing fsck
     to abnormally exit and startup scripts to fail.

SEE ALSO    [Toc]    [Back]

     swapctl(2), fstab(5), mount_nfs(8), vnconfig(8)

HISTORY    [Toc]    [Back]

     The swapctl program was originally developed in NetBSD  1.3.
It was ported
  to  OpenBSD  2.6  by  Tobias  Weingartner.  The original
swapon program,
     provided for backwards compatibility, appeared in 4.0BSD.

AUTHORS    [Toc]    [Back]

     The  swapctl  program  was  written  by  Matthew  R.   Green

OpenBSD      3.6                           June      12,     1997
[ Back ]
 Similar pages
Name OS Title
pccardc FreeBSD PC-CARD (PCMCIA) management and monitoring tool
sn IRIX NUMA Memory Management Configuration Tool
gr_sn IRIX NUMA Memory Management Configuration Tool
dxsysinfo Tru64 Monitors system information such as CPU activity, memory, swap space, and file system usage
swapctl Tru64 Manages the system swap space
SwapManager IRIX view and manage system swap space
kvm_getswapinfo FreeBSD return swap summary statistics for the system
glxchannelrectsyncsgix IRIX configures the system to update video input areas on complete swap buffers of bound xwids
tuning FreeBSD performance tuning under FreeBSD SYSTEM SETUP - DISKLABEL, NEWFS, TUNEFS, SWAP When using disklabel(...
sysinstall FreeBSD system installation and configuration tool
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service