Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Apr 2002 09:03:04 -0700
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        Jeroen Ruigrok/asmodai <asmodai@wxs.nl>
Cc:        "Greg 'groggy' Lehey" <grog@FreeBSD.ORG>, Marcel Moolenaar <marcel@xcllnt.net>, Mike Barcroft <mike@FreeBSD.ORG>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/sbin/savecore savecore.c
Message-ID:  <20020414090304.A61825@troutmask.apl.washington.edu>
In-Reply-To: <20020414103104.GP24261@daemon.ninth-circle.org>; from asmodai@wxs.nl on Sun, Apr 14, 2002 at 12:31:04PM %2B0200
References:  <200204130820.g3D8KGx17608@freefall.freebsd.org> <20020413114643.A2860@espresso.q9media.com> <20020413180300.GB319@dhcp01.pn.xcllnt.net> <20020414095708.S47408@wantadilla.lemis.com> <20020414103104.GP24261@daemon.ninth-circle.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Apr 14, 2002 at 12:31:04PM +0200, Jeroen Ruigrok/asmodai wrote:
> -On [20020414 02:30], Greg 'groggy' Lehey (grog@FreeBSD.org) wrote:
> >You should update the man page.
> 
> For what?
> 
> But seriously, I've seen 4 people reply to a commit, which in total must've
> taken at least over 15-30 minutes, which would've been better used to look
> at the manual page and realise nothing had to be done [2 minutes work, max].
> 

Actually, the -N and -z options weren't re-implemented by Marcel.
I'm not demanding that he do so.  The question is whether these
documented options should be removed from the manual page.  Note,
without the -z option the BUGS section is no longer validate.  There
are additional changes in the usage.

From the manpage,

     savecore -c
     savecore [-fkvz] [-N system] directory

From the usage() function,

     savecore [-cfkv] [directory [device...]]

In the first case, savecore saves the core file to "directory".
In Marcel's new code, savecore saves the core file from either
"directory" or "device".  It also appears that Marcel's code
will only save the core file into the CWD, so running savecore 
during boot may not be a very good idea.

A closer look is required, but it also appears that the 
all information in savecore(8) following the list of 
options is no longer validate.  That is, Marcel's savecore
does not create "directory/vmcore.#" nor does it copy the running
kernel to "directory/kernel.#" (not copying the kernel is probably
okay in that it normally does not contain debugging symbols).

Marcel's savecore creates 2 files "md5.info" and "md5.core" where
"md5" is determined from the md5 checksum of the kernel dump header
struct.

Finally, this little analysis took longer than your 2 minute
estimate.

-- 
Steve


--- savecore.8.orig	Sun Apr 14 08:00:47 2002
+++ savecore.8	Sun Apr 14 09:00:20 2002
@@ -40,17 +40,11 @@
 .Nd "save a core dump of the operating system"
 .Sh SYNOPSIS
 .Nm
-.Fl c
-.Nm
-.Op Fl fkvz
-.Op Fl N Ar system
-.Ar directory
+.Op Fl cfkv
+.Op Ar directory Op Ar device
 .Sh DESCRIPTION
 .Nm Savecore
-copies the currently running kernel and its associated core dump into
-.Fa directory ,
-and enters a reboot message and information about the core dump into
-the system log.
+copies a core dump into the current working directory.
 .Pp
 The options are as follows:
 .Bl -tag -width indent
@@ -59,48 +53,17 @@
 .Nm
 will ignore it.
 .It Fl f
-Force a dump to be taken even if the dump doesn't appear correct or there
+Force a dump to be taken even if the dump does not appear correct or there
 is insufficient disk space.
 .It Fl k
 Do not clear the dump after saving it.
-.It Fl N
-Use
-.Ar system
-as the kernel instead of the running kernel (as determined from
-.Xr getbootfile 3 ) .
 .It Fl v
-Print out some additional debugging information.
-.It Fl z
-Compress the core dump and kernel (see
-.Xr gzip 1 ) .
+Print out additional debugging information.
 .El
 .Pp
-.Nm Savecore
-checks the core dump in various ways to make sure that it is current and
-that it corresponds to the currently running system.
-If it passes these checks, it saves the core image in
-.Ar directory Ns Pa /vmcore.#
-and the system in
-.Ar directory Ns Pa /kernel.#
-The ``#'' is the number from the first line of the file
-.Ar directory Ns Pa /bounds ,
-and it is incremented and stored back into the file each time
-.Nm
-successfully runs.
-.Pp
-.Nm Savecore
-also checks the available disk space before attempting to make the copies.
-If there is insufficient disk space in the filesystem containing
-.Ar directory ,
-or if the file
-.Ar directory Ns Pa /minfree
-exists and the number of free kilobytes (for non-superusers) in the
-filesystem after the copies were made would be less than the number
-in the first line of this file, the copies are not attempted.
-.Pp
 If
 .Nm
-successfully copies the kernel and the core dump, the core dump is cleared
+successfully copies the the core dump, the core dump is cleared
 so that future invocations of
 .Nm
 will ignore it.
@@ -110,15 +73,15 @@
 .Pa /etc/rc
 (see
 .Xr rc 8 ) .
-.Sh BUGS
-The minfree code does not consider the effect of compression.
 .Sh SEE ALSO
-.Xr gzip 1 ,
-.Xr getbootfile 3 ,
 .Xr dumpon 8 ,
-.Xr syslogd 8
 .Sh HISTORY
 The
 .Nm
 command appeared in
 .Bx 4.1 .
+The format of the core dump was changed in 
+.Fx 5 ,
+so
+.Nm
+was essentially rewritten from scratch.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020414090304.A61825>