Commit | Line | Data |
---|---|---|
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 | |
10 | savecore \- 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 | 19 | is meant to be called near the end of the /etc/rc file. Its function |
55e9aead KM |
20 | is to save the core dump of the system (assuming one was made) and to |
21 | write a reboot message in the shutdown log. | |
22 | .PP | |
23 | Savecore checks the core dump to be certain it corresponds with the | |
24 | current running unix. If it does it saves the core image in the file | |
25 | .IR dirname /vmcore.n | |
b77763cc | 26 | and its brother, the namelist, |
55e9aead KM |
27 | .IR dirname /vmunix.n |
28 | The trailing ".n" in the pathnames is replaced by a number which grows | |
29 | every time | |
30 | .I savecore | |
31 | is run in that directory. | |
32 | .PP | |
33 | Before savecore writes out a core image, it reads a number from the file | |
34 | .IR dirname /minfree. | |
b77763cc | 35 | If the number of free kilobytes on the filesystem which contains |
55e9aead | 36 | .I dirname |
b77763cc MK |
37 | is less than the number obtained from the minfree file, |
38 | the core dump is not saved. | |
55e9aead KM |
39 | If the minfree file does not exist, savecore always writes out the core |
40 | file (assuming that a core dump was taken). | |
41 | .PP | |
42 | .I Savecore | |
b77763cc MK |
43 | also logs a reboot message using facility LOG_AUTH (see |
44 | .IR syslog (3)) | |
45 | If the system crashed as a result of a panic, | |
55e9aead | 46 | .I savecore |
b77763cc | 47 | logs the panic string too. |
69c0b9ca KM |
48 | .PP |
49 | If the core dump was from a system other than /vmunix, the name | |
50 | of 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 | 56 | Can be fooled into thinking a core dump is the wrong size. |