141 lines
4.5 KiB
Groff
141 lines
4.5 KiB
Groff
.\" Copyright (c) 1980, 1991, 1993
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed by the University of
|
|
.\" California, Berkeley and its contributors.
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" @(#)swapon.2 8.1 (Berkeley) 6/4/93
|
|
.\" %FreeBSD: src/lib/libc/sys/swapon.2,v 1.16 2004/07/02 23:52:13 ru Exp %
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.Dd June 4, 1993
|
|
.Dt SWAPON 2
|
|
.Os
|
|
.Sh ̾¾Î
|
|
.Nm swapon , swapoff
|
|
.Nd ¥¤¥ó¥¿¥ê¡¼¥Ö¥Ú¡¼¥¸¥ó¥°/¥¹¥ï¥Ã¥×ÍѤΥ¹¥ï¥Ã¥×¥Ç¥Ð¥¤¥¹¤ÎÀ©¸æ
|
|
.Sh ¥é¥¤¥Ö¥é¥ê
|
|
.Lb libc
|
|
.Sh ½ñ¼°
|
|
.In unistd.h
|
|
.Ft int
|
|
.Fn swapon "const char *special"
|
|
.Ft int
|
|
.Fn swapoff "const char *special"
|
|
.Sh ²òÀâ
|
|
.Fn swapon
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢¥·¥¹¥Æ¥à¤¬¥Ú¡¼¥¸¥ó¥°¤È¥¹¥ï¥Ã¥Ô¥ó¥°¤Î³ä¤êÅö¤Æ¤Ë
|
|
¥Ö¥í¥Ã¥¯¥Ç¥Ð¥¤¥¹
|
|
.Fa special
|
|
¤ò»ÈÍѤǤ¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£
|
|
ÀøºßŪ¤Ë»ÈÍѤǤ¤ë¥Ç¥Ð¥¤¥¹¤Î̾Á°¤Ï¥·¥¹¥Æ¥à¤ËÃΤé¤ì¤Æ¤¤¤Æ¡¢
|
|
¥·¥¹¥Æ¥àÀßÄê»þ¤ËÄêµÁ¤µ¤ì¤Þ¤¹¡£
|
|
.Fa special
|
|
¤Î¥¹¥ï¥Ã¥×Îΰè¤Î¥µ¥¤¥º¤Ï¡¢¥Ç¥Ð¥¤¥¹¤¬¥¹¥ï¥Ã¥Ô¥ó¥°¤Ë
|
|
½é¤á¤Æ»ÈÍѤǤ¤ë¤è¤¦¤Ë¤Ê¤ë¤È¤¤Ë»»½Ð¤µ¤ì¤Þ¤¹¡£
|
|
.Pp
|
|
.Fn swapoff
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢Í¿¤¨¤é¤ì¤¿¥Ç¥Ð¥¤¥¹¤Î¥Ú¡¼¥¸¥ó¥°¤È¥¹¥ï¥Ã¥Ô¥ó¥°¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£
|
|
¤¹¤Ù¤Æ¤Î´ØÏ¢¤·¤¿¥¹¥ï¥Ã¥×¤Î¥á¥¿¥Ç¡¼¥¿¤Ï³ä¤êÅö¤Æ²ò½ü¤µ¤ì¡¢¤½¤Î¥Ç¥Ð¥¤¥¹¤Ï
|
|
¾¤ÎÍÑÅÓ¤ÇÍøÍѲÄǽ¤Ë¤µ¤ì¤Þ¤¹¡£
|
|
.Sh Ìá¤êÃÍ
|
|
¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¤Ï -1 ¤¬ÊÖ¤µ¤ì¡¢¥¨¥é¡¼¤ò¼¨¤¹¤¿¤á¤Ë
|
|
.Va errno
|
|
¤¬ÀßÄꤵ¤ì¤Þ¤¹¡£
|
|
.Sh ¥¨¥é¡¼
|
|
.Fn swapon
|
|
¤ª¤è¤Ó
|
|
.Fn swapoff
|
|
¤Ï¶¦¤Ë°Ê²¼¤Î¾ì¹ç¤Ë¼ºÇÔ¤·¤Þ¤¹:
|
|
.Bl -tag -width Er
|
|
.It Bq Er ENOTDIR
|
|
¥Ñ¥¹¤Î¹½À®Í×ÁÇÃæ¤Ë¥Ç¥£¥ì¥¯¥È¥ê°Ê³°¤Î¤â¤Î¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er ENAMETOOLONG
|
|
¥Ñ¥¹Ì¾¤Î¹½À®Í×ÁǤ¬ 255 ʸ»ú¤ò±Û¤¨¤Æ¤¤¤ë¤«¡¢
|
|
¤Þ¤¿¤Ï¥Ñ¥¹Ì¾Á´ÂΤ¬ 1023 ʸ»ú¤ò±Û¤¨¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er ENOENT
|
|
»ØÄꤷ¤¿¥Ç¥Ð¥¤¥¹¤¬Â¸ºß¤·¤Þ¤»¤ó¡£
|
|
.It Bq Er EACCES
|
|
»ØÄꤵ¤ì¤¿¥Ñ¥¹¤Ë¤Ï¡¢¸¡º÷¤¬µö²Ä¤µ¤ì¤Æ¤¤¤Ê¤¤¥Ç¥£¥ì¥¯¥È¥ê¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er ELOOP
|
|
¥Ñ¥¹Ì¾¤òÊÑ´¹¤¹¤ë¤È¤¤Ë¸¡½Ð¤µ¤ì¤¿¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤¬Â¿¤¹¤®¤Þ¤¹¡£
|
|
.It Bq Er EPERM
|
|
¥¹¡¼¥Ñ¥æ¡¼¥¶°Ê³°¤Î¥æ¡¼¥¶¤Ë¤è¤Ã¤Æ¸Æ¤Ó½Ð¤µ¤ì¤Þ¤·¤¿¡£
|
|
.It Bq Er EFAULT
|
|
.Fa special
|
|
°ú¿ô¤¬¥×¥í¥»¥¹¤Ë³ä¤êÅö¤Æ¤é¤ì¤¿¥¢¥É¥ì¥¹¶õ´Ö¤Î³°Â¦¤ò»Ø¤·¤Æ¤¤¤Þ¤¹¡£
|
|
.El
|
|
.Pp
|
|
²Ã¤¨¤Æ¡¢
|
|
.Fn swapon
|
|
¤Ï°Ê²¼¤ÎÍýͳ¤Ç¼ºÇÔ¤·¤Þ¤¹:
|
|
.Bl -tag -width Er
|
|
.It Bq Er EINVAL
|
|
¥·¥¹¥Æ¥à¤¬¥Ö¡¼¥È»þ¤Î¥¹¥ï¥Ã¥×¥Ç¥Ð¥¤¥¹¿ô
|
|
.Va vm.nswapdev
|
|
¤ÎÀ©¸Â¤Ë㤷¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er ENOTBLK
|
|
.Fa special
|
|
°ú¿ô¤Ï¥Ö¥í¥Ã¥¯¥Ç¥Ð¥¤¥¹¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
|
|
.It Bq Er EBUSY
|
|
.Fa special
|
|
¤Ç»ØÄꤷ¤¿¥Ç¥Ð¥¤¥¹¤Ï¡¢¤¹¤Ç¤Ë¥¹¥ï¥Ã¥Ô¥ó¥°¤Ë»ÈÍѤǤ¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
|
|
.It Bq Er ENXIO
|
|
.Fa special
|
|
¤Î¥á¥¸¥ã¡¼¥Ç¥Ð¥¤¥¹Èֹ椬Èϰϳ°¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹
|
|
(¤³¤ì¤Ï´ØÏ¢¤¹¤ë¥Ï¡¼¥É¥¦¥§¥¢¤ËÂбþ¤¹¤ë¥Ç¥Ð¥¤¥¹¥É¥é¥¤¥Ð¤¬
|
|
¸ºß¤·¤Ê¤¤¤³¤È¤òɽ¤·¤Þ¤¹)¡£
|
|
.It Bq Er EIO
|
|
¥¹¥ï¥Ã¥×¥Ç¥Ð¥¤¥¹¤ò¥ª¡¼¥×¥ó¤¹¤ë´Ö¤ËÆþ½ÐÎÏ¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£
|
|
.El
|
|
.Pp
|
|
ºÇ¸å¤Ë¡¢
|
|
.Fn swapoff
|
|
¤Ï°Ê²¼¤Î¾ì¹ç¤Ë¼ºÇÔ¤·¤Þ¤¹:
|
|
.Bl -tag -width Er
|
|
.It Bq Er EINVAL
|
|
¸½ºß¡¢¥·¥¹¥Æ¥à¤¬
|
|
.Fa special
|
|
¤Ë¥¹¥ï¥Ã¥×¤·¤Æ¤¤¤Þ¤»¤ó¡£
|
|
.It Bq Er ENOMEM
|
|
Í¿¤¨¤é¤ì¤¿¥Ç¥Ð¥¤¥¹¤Î¥Ú¡¼¥¸¥ó¥°¤È¥¹¥ï¥Ã¥Ô¥ó¥°¤ò°ÂÁ´¤Ë̵¸ú²½¤¹¤ë¤¿¤á¤Î
|
|
²¾ÁÛ¥á¥â¥ê¤¬½½Ê¬¤ËÍøÍѤǤ¤Þ¤»¤ó¡£
|
|
.El
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr config 8 ,
|
|
.Xr swapon 8 ,
|
|
.Xr sysctl 8
|
|
.Sh Îò»Ë
|
|
.Fn swapon
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢
|
|
.Bx 4.0
|
|
¤ÇÅо줷¤Þ¤·¤¿¡£
|
|
.Fn swapoff
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢
|
|
.Fx 5.0
|
|
¤ÇÅо줷¤Þ¤·¤¿¡£
|