Sort options. Sync usage with man page.
This commit is contained in:
parent
2161b003f1
commit
d728febe7a
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: swapctl.8,v 1.34 2006/08/23 20:53:53 wiz Exp $
|
||||
.\" $NetBSD: swapctl.8,v 1.35 2006/08/23 20:59:09 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1997 Matthew R. Green
|
||||
.\" All rights reserved.
|
||||
|
@ -56,8 +56,7 @@
|
|||
.Ar path
|
||||
.Nm
|
||||
.Fl l | Fl s
|
||||
.Op Fl k | Fl m | Fl g
|
||||
.Op Fl h
|
||||
.Op Fl k | Fl m | Fl g | Fl h
|
||||
.Nm
|
||||
.Fl z
|
||||
.Nm swapon
|
||||
|
@ -106,37 +105,6 @@ type.
|
|||
If no swap devices are configured,
|
||||
.Nm
|
||||
will exit with an error code.
|
||||
.It Fl D
|
||||
The
|
||||
.Fl D
|
||||
option requires that a
|
||||
.Ar dumpdev
|
||||
also be in the argument list.
|
||||
The kernel dump device is set to
|
||||
.Ar dumpdev .
|
||||
The word
|
||||
.Dq none
|
||||
can be used instead of a
|
||||
.Ar dumpdev
|
||||
to disable the currently set dump device.
|
||||
This change is made via the
|
||||
.Xr swapctl 2
|
||||
system call.
|
||||
The dump device is used when the system crashes
|
||||
to write a current snapshot of real memory, to be saved later with
|
||||
.Xr savecore 8
|
||||
at system reboot, and analyzed to determine the problem.
|
||||
.It Fl U
|
||||
This option causes
|
||||
.Nm
|
||||
to read the
|
||||
.Pa /etc/fstab
|
||||
file for devices and files with a
|
||||
.Dq sw
|
||||
type, and remove all these entries as swap devices.
|
||||
If no swap devices are unconfigured,
|
||||
.Nm
|
||||
will exit with an error code.
|
||||
.It Fl a
|
||||
The
|
||||
.Fl a
|
||||
|
@ -159,20 +127,54 @@ option, for backwards compatibility.
|
|||
The
|
||||
.Fl c
|
||||
option changes the priority of the listed swap device or file.
|
||||
.It Fl D
|
||||
The
|
||||
.Fl D
|
||||
option requires that a
|
||||
.Ar dumpdev
|
||||
also be in the argument list.
|
||||
The kernel dump device is set to
|
||||
.Ar dumpdev .
|
||||
The word
|
||||
.Dq none
|
||||
can be used instead of a
|
||||
.Ar dumpdev
|
||||
to disable the currently set dump device.
|
||||
This change is made via the
|
||||
.Xr swapctl 2
|
||||
system call.
|
||||
The dump device is used when the system crashes
|
||||
to write a current snapshot of real memory, to be saved later with
|
||||
.Xr savecore 8
|
||||
at system reboot, and analyzed to determine the problem.
|
||||
.It Fl d
|
||||
The
|
||||
.Fl d
|
||||
option removes the listed
|
||||
.Ar path
|
||||
from the kernel's list of swap devices or files.
|
||||
.It Fl g
|
||||
The
|
||||
.Fl g
|
||||
option uses (1024 * 1024 * 1024) byte blocks instead of the default 512 byte.
|
||||
.It Fl h
|
||||
The
|
||||
.Fl h
|
||||
option uses
|
||||
.Xr humanize_number 3
|
||||
to display the sizes.
|
||||
.It Fl k
|
||||
The
|
||||
.Fl k
|
||||
option uses 1024 byte blocks instead of the default 512 byte.
|
||||
.It Fl l
|
||||
The
|
||||
.Fl l
|
||||
option lists the current swap devices and files, and their usage statistics.
|
||||
.It Fl s
|
||||
.It Fl m
|
||||
The
|
||||
.Fl s
|
||||
option displays a single line summary of current swap statistics.
|
||||
.Fl m
|
||||
option uses (1024 * 1024) byte blocks instead of the default 512 byte.
|
||||
.It Fl p
|
||||
The
|
||||
.Fl p
|
||||
|
@ -186,24 +188,10 @@ This works with the
|
|||
and
|
||||
.Fl l
|
||||
options.
|
||||
.It Fl k
|
||||
.It Fl s
|
||||
The
|
||||
.Fl k
|
||||
option uses 1024 byte blocks instead of the default 512 byte.
|
||||
.It Fl m
|
||||
The
|
||||
.Fl m
|
||||
option uses (1024 * 1024) byte blocks instead of the default 512 byte.
|
||||
.It Fl g
|
||||
The
|
||||
.Fl g
|
||||
option uses (1024 * 1024 * 1024) byte blocks instead of the default 512 byte.
|
||||
.It Fl h
|
||||
The
|
||||
.Fl h
|
||||
option uses
|
||||
.Xr humanize_number 3
|
||||
to display the sizes.
|
||||
.Fl s
|
||||
option displays a single line summary of current swap statistics.
|
||||
.It Fl t
|
||||
This flag modifies the function of the
|
||||
.Fl A
|
||||
|
@ -226,6 +214,17 @@ to be added.
|
|||
This option is useful in early system startup, where swapping
|
||||
may be needed before all file systems are available, such as during
|
||||
disk checks of large file systems.
|
||||
.It Fl U
|
||||
This option causes
|
||||
.Nm
|
||||
to read the
|
||||
.Pa /etc/fstab
|
||||
file for devices and files with a
|
||||
.Dq sw
|
||||
type, and remove all these entries as swap devices.
|
||||
If no swap devices are unconfigured,
|
||||
.Nm
|
||||
will exit with an error code.
|
||||
.It Fl z
|
||||
The
|
||||
.Fl z
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: swapctl.c,v 1.30 2006/08/22 14:08:36 martin Exp $ */
|
||||
/* $NetBSD: swapctl.c,v 1.31 2006/08/23 20:59:09 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1997, 1999 Matthew R. Green
|
||||
|
@ -58,7 +58,7 @@
|
|||
#include <sys/cdefs.h>
|
||||
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: swapctl.c,v 1.30 2006/08/22 14:08:36 martin Exp $");
|
||||
__RCSID("$NetBSD: swapctl.c,v 1.31 2006/08/23 20:59:09 wiz Exp $");
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -587,12 +587,12 @@ usage(void)
|
|||
|
||||
fprintf(stderr, "usage: %s -A [-p priority] [-t blk|noblk]\n",
|
||||
progname);
|
||||
fprintf(stderr, " %s -D dumppath\n", progname);
|
||||
fprintf(stderr, " %s -U [-t blk|noblk]\n", progname);
|
||||
fprintf(stderr, " %s -a [-p priority] path\n", progname);
|
||||
fprintf(stderr, " %s -c -p priority path\n", progname);
|
||||
fprintf(stderr, " %s -D dumpdev|none\n", progname);
|
||||
fprintf(stderr, " %s -d path\n", progname);
|
||||
fprintf(stderr, " %s -l | -s [-k|-m|-g|-h]\n", progname);
|
||||
fprintf(stderr, " %s -U [-t blk|noblk]\n", progname);
|
||||
fprintf(stderr, " %s -z\n", progname);
|
||||
exit(1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue