Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ swapon(2) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

swapon(1M)

SWAPON(2)

NAME

swapon − add swap space for interleaved paging/swapping

SYNOPSIS

swapon (special)|(directory, [min, limit, reserve, priority])
char * special, directory;
int min, limit, reserve, priority;

DESCRIPTION

Swapon makes the block device special available to the system for allocation for paging and swapping.  The names of potentially available devices are known to the system and defined at system configuration time.  See the appropriate system administrator’s manual for information on how the size of the swap area is calculated. 

Swapon can also make the blocks on the file system specified by directory available for paging and swapping. 

The min limit reserve and priority parameters default to zero and only have meaning if the first parameter passed to swapon is a directory. 

min indicates the number of file system blocks to take from the file system at the time that swapon() is called. 

limit indicates the maximum number of file system blocks the swap system is allowed to take from the file system. 

reserve indicates the number of file system blocks that are saved for file system use only. 

priority indicates the order in which space is taken from the file systems used for swap.  Space is taken from the lower priority systems first. 

File systems used for swapping do not have to be configured into the system. 

Swapon may be invoked only by the super-user. 

ERRORS

Swapon will fail if one or more of the following are true:

[ENOTBLK] Special is not the name of a block special file. 

[ENXIO] The device associated with special could not be opened. 

[EBUSY] The device associated with special is already in use. 

[ENODEV] The device associated with special does not exist. 

[EPERM] The effective user ID is not super-user. 

[ELOOP] Too many symbolic links were encountered in translating the path name. 

[ENOENT] The swap space requested is not a block special file or a directory

[ENOSPC] There is is not enough available space on the file system specified to allocate the amount requested in the min parameter. 

[EINVAL] The system imposed limit on the number of swap file entries has been reached. 

[ENAMETOOLONG]
The length of the specified path name exceeds PATH_MAX bytes, or the length of a component of the path name exceeds NAME_MAX bytes while _POSIX_NO_TRUNC is in effect. 

WARNINGS

There is no way to stop swapping on a disk so that the pack may be dismounted. 

The system will allocate no less than the amount specified in "min", however, to make the most efficient use of space, more than the amount requested might be taken from the file system.  The actual amount taken will not exceed the number of file system blocks indicated in "reserve". 

Swapping to the file system can be slower than swapping to a device. 

AUTHOR

Swapon was developed by the University of California, Berkeley. 

SEE ALSO

swapon(1M). 

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026