From owner-svn-src-user@freebsd.org Tue Mar 6 21:14:25 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 898A0F2FF77 for ; Tue, 6 Mar 2018 21:14:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A8406BD30; Tue, 6 Mar 2018 21:14:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1FA00182FA; Tue, 6 Mar 2018 21:14:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w26LEOcj028296; Tue, 6 Mar 2018 21:14:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w26LEOgM028294; Tue, 6 Mar 2018 21:14:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201803062114.w26LEOgM028294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 6 Mar 2018 21:14:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r330548 - user/markj/netdump/sbin/dumpon X-SVN-Group: user X-SVN-Commit-Author: markj X-SVN-Commit-Paths: user/markj/netdump/sbin/dumpon X-SVN-Commit-Revision: 330548 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 21:14:25 -0000 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 |default] -s -c \n" - " dumpon [-v] off", - " dumpon [-v] -l"); + fprintf(stderr, + "usage: dumpon [-v] [-k ] [-Zz] \n" + " dumpon [-v] [-k ] [-Zz]\n" + " [-g |default] -s -c \n" + " dumpon [-v] off\n" + " dumpon [-v] -l\n"); exit(EX_USAGE); }