new logging
[unix-history] / usr / src / sbin / savecore / savecore.8
CommitLineData
55e9aead
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
b77763cc 5.\" @(#)savecore.8 6.3 (Berkeley) %G%
55e9aead 6.\"
b803bd5a 7.TH SAVECORE 8 ""
55e9aead
KM
8.UC 4
9.SH NAME
10savecore \- save a core dump of the operating system
11.SH SYNOPSIS
69c0b9ca 12.B /etc/savecore
55e9aead 13.I dirname
69c0b9ca
KM
14[
15.I system
16]
55e9aead 17.SH DESCRIPTION
55e9aead 18.I Savecore
69c0b9ca 19is meant to be called near the end of the /etc/rc file. Its function
55e9aead
KM
20is to save the core dump of the system (assuming one was made) and to
21write a reboot message in the shutdown log.
22.PP
23Savecore checks the core dump to be certain it corresponds with the
24current running unix. If it does it saves the core image in the file
25.IR dirname /vmcore.n
b77763cc 26and its brother, the namelist,
55e9aead
KM
27.IR dirname /vmunix.n
28The trailing ".n" in the pathnames is replaced by a number which grows
29every time
30.I savecore
31is run in that directory.
32.PP
33Before savecore writes out a core image, it reads a number from the file
34.IR dirname /minfree.
b77763cc 35If the number of free kilobytes on the filesystem which contains
55e9aead 36.I dirname
b77763cc
MK
37is less than the number obtained from the minfree file,
38the core dump is not saved.
55e9aead
KM
39If the minfree file does not exist, savecore always writes out the core
40file (assuming that a core dump was taken).
41.PP
42.I Savecore
b77763cc
MK
43also logs a reboot message using facility LOG_AUTH (see
44.IR syslog (3))
45If the system crashed as a result of a panic,
55e9aead 46.I savecore
b77763cc 47logs the panic string too.
69c0b9ca
KM
48.PP
49If the core dump was from a system other than /vmunix, the name
50of that system must be supplied as
51.IR sysname .
55e9aead
KM
52.SH FILES
53.DT
69c0b9ca 54/vmunix current UNIX
55e9aead 55.SH BUGS
69c0b9ca 56Can be fooled into thinking a core dump is the wrong size.