4.3BSD-Reno/src/sbin/savecore/savecore.8

Compare this file to the similar file:
Show the results in this format:

.\" Copyright (c) 1980 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms are permitted provided
.\" that: (1) source distributions retain this entire copyright notice and
.\" comment, and (2) distributions including binaries display the following
.\" acknowledgement:  ``This product includes software developed by the
.\" University of California, Berkeley and its contributors'' in the
.\" documentation or other materials provided with the distribution and in
.\" all advertising materials mentioning features or use of this software.
.\" Neither the name of the University nor the names of its contributors may
.\" be used to endorse or promote products derived from this software without
.\" specific prior written permission.
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\"	@(#)savecore.8	6.5 (Berkeley) 6/24/90
.\"
.TH SAVECORE 8 "June 24, 1990"
.UC 4
.SH NAME
savecore \- save a core dump of the operating system
.SH SYNOPSIS
.B savecore
.I dirname
[
.I system
]
.SH DESCRIPTION
.I Savecore
is meant to be called near the end of the /etc/rc file.  Its function
is to save the core dump of the system (assuming one was made) and to
write a reboot message in the shutdown log.
.PP
Savecore checks the core dump to be certain it corresponds with the
current running unix.  If it does it saves the core image in the file
.IR dirname /vmcore.n
and its brother, the namelist,
.IR dirname /vmunix.n
The trailing ".n" in the pathnames is replaced by a number which grows
every time
.I savecore
is run in that directory.
.PP
Before savecore writes out a core image, it reads a number from the file
.IR dirname /minfree.
If the number of free kilobytes on the filesystem which contains
.I dirname
is less than the number obtained from the minfree file,
the core dump is not saved.
If the minfree file does not exist, savecore always writes out the core
file (assuming that a core dump was taken).
.PP
.I Savecore
also logs a reboot message using facility LOG_AUTH (see
.IR syslog (3))
If the system crashed as a result of a panic,
.I savecore
logs the panic string too.
.PP
If the core dump was from a system other than /vmunix, the name
of that system must be supplied as
.IR sysname .
.SH FILES
.DT
/vmunix		current UNIX
.SH BUGS
Can be fooled into thinking a core dump is the wrong size.