svn commit: r330548 - user/markj/netdump/sbin/dumpon
Mark Johnston
markj at FreeBSD.org
Tue Mar 6 21:14:25 UTC 2018
Author: markj
Date: Tue Mar 6 21:14:24 2018
New Revision: 330548
URL: https://svnweb.freebsd.org/changeset/base/330548
Log:
Update the dumpon(8) usage message and man page to describe netdump.
Modified:
user/markj/netdump/sbin/dumpon/dumpon.8
user/markj/netdump/sbin/dumpon/dumpon.c
Modified: user/markj/netdump/sbin/dumpon/dumpon.8
==============================================================================
--- user/markj/netdump/sbin/dumpon/dumpon.8 Tue Mar 6 21:05:34 2018 (r330547)
+++ user/markj/netdump/sbin/dumpon/dumpon.8 Tue Mar 6 21:14:24 2018 (r330548)
@@ -28,7 +28,7 @@
.\" From: @(#)swapon.8 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$
.\"
-.Dd February 13, 2018
+.Dd March 6, 2018
.Dt DUMPON 8
.Os
.Sh NAME
@@ -37,10 +37,19 @@
.Sh SYNOPSIS
.Nm
.Op Fl v
-.Op Fl k Ar public_key_file
+.Op Fl k Ar pubkey
+.Op Fl Z
.Op Fl z
+.Ar device
+.Nm
+.Op Fl v
+.Op Fl k Ar pubkey
.Op Fl Z
-.Ar special_file
+.Op Fl z
+.Op Fl g Ar gateway | Li default
+.Fl s Ar server
+.Fl c Ar client
+.Ar iface
.Nm
.Op Fl v
.Cm off
@@ -60,7 +69,7 @@ normally occur from the system multi-user initializati
controlled by the
.Dq dumpdev
and
-.Dq dumppubkey
+.Dq dumpon_flags
variables in the boot time configuration file
.Pa /etc/rc.conf .
.Pp
@@ -72,8 +81,7 @@ Alternatively, full memory dumps can be enabled by set
variable to 0.
.Pp
For systems using full memory dumps, the size of the specified dump
-device must be at
-least the size of physical memory.
+device must be at least the size of physical memory.
Even though an additional 64 kB header is added to the dump, the BIOS for a
platform typically holds back some memory, so it is not usually
necessary to size the dump device larger than the actual amount of RAM
@@ -86,8 +94,35 @@ total amount of physical memory as reported by the
.Xr sysctl 8
variable.
.Pp
+.Nm
+is used to configure a local storage device as the dump device.
+With additional parameters, the kernel can instead be configured to
+transmit a dump to a remove server using
+.Xr netdump 4 .
+This eliminates the need to reserve space for saving crash dumps and
+is especially useful in diskless environments.
The
-.Op Fl k Ar public_key_file
+.Xr netdump 4
+server address is specified with
+.Fl s Ar server ,
+and the local address is specified with
+.Fl c Ar client .
+The
+.Fl g Ar gateway
+parameter may be used to specify a first-hop router to the server,
+or to specify that the currently configured default gateway is to
+be used.
+Note that the
+.Xr netdump 4
+configuration is not automatically updated if any network configuration
+(e.g., the default route) changes after the
+.Nm
+invocation.
+The name of the interface to be used must be specified as
+.Ar iface .
+.Pp
+The
+.Fl k Ar pubkey
flag causes
.Nm
to generate a one-time key for kernel crash dump encryption.
@@ -95,16 +130,16 @@ The key will be replaced by a new one when the
.Nm
utility is run again.
The key is encrypted using
-.Ar public_key_file .
+.Ar pubkey .
This process is sandboxed using
.Xr capsicum 4 .
Both plain and encrypted keys are sent to the kernel using
.Dv DIOCSKERNELDUMP
.Xr ioctl 2 .
A user can specify the
-.Ar public_key_file
+.Ar pubkey
in the
-.Dq dumppubkey
+.Dq dumpon_flags
variable defined in
.Pa /etc/rc.conf
for use with the
@@ -172,13 +207,13 @@ should be used as the dump device.
The
.Nm
utility operates by opening
-.Ar special_file
+.Ar device
and making a
.Dv DIOCSKERNELDUMP
.Xr ioctl 2
request on it to save kernel crash dumps.
If
-.Ar special_file
+.Ar device
is the text string:
.Dq Li off ,
.Nm
Modified: user/markj/netdump/sbin/dumpon/dumpon.c
==============================================================================
--- user/markj/netdump/sbin/dumpon/dumpon.c Tue Mar 6 21:05:34 2018 (r330547)
+++ user/markj/netdump/sbin/dumpon/dumpon.c Tue Mar 6 21:14:24 2018 (r330548)
@@ -84,11 +84,12 @@ static int verbose;
static void
usage(void)
{
- fprintf(stderr, "%s\n%s\n%s\n",
- "usage: dumpon [-v] [-k public_key_file] [-Zz] special_file",
- "usage: dumpon [-v] [-g <gateway>|default] -s <host> -c <client> <iface>\n"
- " dumpon [-v] off",
- " dumpon [-v] -l");
+ fprintf(stderr,
+ "usage: dumpon [-v] [-k <pubkey>] [-Zz] <device>\n"
+ " dumpon [-v] [-k <pubkey>] [-Zz]\n"
+ " [-g <gateway>|default] -s <server> -c <client> <iface>\n"
+ " dumpon [-v] off\n"
+ " dumpon [-v] -l\n");
exit(EX_USAGE);
}
More information about the svn-src-user
mailing list