better calculation of freespace
[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.\"
b803bd5a 5.\" @(#)savecore.8 6.1 (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
26and it's brother, the namelist,
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.
b803bd5a 35If the number of free bytes on the filesystem which contains
55e9aead 36.I dirname
b803bd5a
KM
37is less than the number obtained from the minfree file times 1024,
38the core dump is not done.
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
43also writes a reboot message in the shut down log. If the system crashed
44as a result of a panic,
45.I savecore
46records the panic string in the shut down log too.
69c0b9ca
KM
47.PP
48If the core dump was from a system other than /vmunix, the name
49of that system must be supplied as
50.IR sysname .
55e9aead
KM
51.SH FILES
52.DT
69c0b9ca 53/usr/adm/shutdownlog shut down log
55e9aead 54.br
69c0b9ca 55/vmunix current UNIX
55e9aead 56.SH BUGS
69c0b9ca 57Can be fooled into thinking a core dump is the wrong size.