swapoff 中文man页面

系统
Swapoff 禁止 在 指定的 设备和文件 上 做 交换, 如果 指定了 -a 选项, /etc/fstab 中 所有的 交换设备 皆被 关闭.

NAME

swapon, swapoff - 使用/关闭用于分页和交换的文件和设备

总览 (SYNOPSIS)

/sbin/swapon [-h -V]
/sbin/swapon -a [-v]
/sbin/swapon [-v] [-p priority] specialfile ...
/sbin/swapon [-s]
/sbin/swapoff [-h -V]
/sbin/swapoff -a
/sbin/swapoff specialfile ...

描述 (DESCRIPTION)

Swapon 指出 用于 分页和交换 的 设备. 一般 在 系统 多用户运行级 的 初始化文件 /etc/rc 中 调用 swapon , 使 所有的 交换设备 生效, 因此 分页和交换 活动 可以 在 多个 设备和文件之中 进行.

常用的形式有:

-h
显示帮助
-V
显示版本
-s
显示交换设备的使用情况.这个选项需要 /proc/swaps (小于 2.1.25 的 内核 可能没有).
-a
使 /etc/fstab 中, 所有 标记了 'sw' 的 交换设备 生效.
-p priority
指定 swapon 的 优先级. 这个 选项 要求 swapon 在 1.3.2 或 更高 的 内核 上 编译 和 使用. priority 介于 0 和 32767 之间. 关于 交换优先级 的 完整 描述 请 参看 swapon(2)./etc/fstab 文件 中, 交换设备 的 选项域 里 加上 pri=value,swapon -a 可以 使其 生效.

Swapoff 禁止 在 指定的 设备和文件 上 做 交换, 如果 指定了 -a 选项, /etc/fstab 中 所有的 交换设备 皆被 关闭.  

注意 (NOTE)

别在 包含 空洞(hole) 的 文件 上 使用 swapon .  

参见 (SEE ALSO)

swapon(2), swapoff(2), fstab(5), init(8), mkswap(8), rc(8), mount(8)  

#p#

NAME

swapon, swapoff - enable/disable devices and files for paging and swapping  

SYNOPSIS

/sbin/swapon [-h -V]
/sbin/swapon -a [-v] [-e]
/sbin/swapon [-v] [-p priority] specialfile ...
/sbin/swapon [-s]
/sbin/swapoff [-h -V]
/sbin/swapoff -a
/sbin/swapoff specialfile ...  

DESCRIPTION

Swapon is used to specify devices on which paging and swapping are to take place. Calls to swapon normally occur in the system multi-user initialization file /etc/rc making all swap devices available, so that the paging and swapping activity is interleaved across several devices and files.

Normally, the first form is used:

-h
Provide help
-V
Display version
-s
Display swap usage summary by device. Equivalent to "cat /proc/swaps". Not available before Linux 2.1.25.
-a
All devices marked as ``swap'' swap devices in /etc/fstab are made available. Devices that are already running as swap are silently skipped.
-e
When -a is used with swapon, -e makes swapon silently skip devices that do not exist.
-p priority
Specify priority for swapon. This option is only available if swapon was compiled under and is used under a 1.3.2 or later kernel. priority is a value between 0 and 32767. See swapon(2) for a full description of swap priorities. Add pri=value to the option field of /etc/fstab for use with swapon -a.

Swapoff disables swapping on the specified devices and files. When the -a flag is given, swapping is disabled on all known swap devices and files (as found in /proc/swaps or /etc/fstab).  

NOTE

You should not use swapon on a file with holes. Swap over NFS may not work.  

SEE ALSO

swapon(2), swapoff(2), fstab(5), init(8), mkswap(8), rc(8), mount(8)  

责任编辑:韩亚珊 来源: CMPP.net
相关推荐

2011-08-24 16:48:36

man中文man

2011-08-15 10:21:09

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-11-01 13:46:50

中文mantac

2011-08-25 16:55:26

gets中文man

2011-08-25 15:49:02

freopen中文man

2011-08-25 16:00:56

fflush中文man

2011-08-25 16:08:55

fsetpos中文man

2011-08-25 15:33:18

exit中文man

2011-08-25 10:55:37

services中文man

2011-08-25 09:35:26

units中文man

2011-08-24 13:57:35

DECLARE中文man

2011-08-11 15:28:43

ali中文man

2011-08-23 17:24:11

userdel中文man

2011-08-23 17:33:22

rdev中文man

2011-08-23 18:05:21

ABORT中文man

2011-08-18 19:15:25

group中文man

2011-08-23 10:17:54

bdflush中文man

2011-08-23 10:48:03

exportfs中文man
点赞
收藏

51CTO技术栈公众号