xref: /original-bsd/sbin/savecore/savecore.8 (revision c3e32dec)
1.\" Copyright (c) 1980, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)savecore.8	8.1 (Berkeley) 06/05/93
7.\"
8.Dd
9.Dt SAVECORE 8
10.Os BSD 4
11.Sh NAME
12.Nm savecore
13.Nd "save a core dump of the operating system"
14.Sh SYNOPSIS
15.Nm savecore
16.Fl c
17.Nm savecore
18.Op Fl fvz
19.Op Fl N Ar system
20.Ar directory
21.Sh DESCRIPTION
22.Nm Savecore
23copies the currently running kernel and its associated core dump into
24.Fa directory ,
25and enters a reboot message and information about the core dump into
26the system log.
27.Pp
28The options are as follows:
29.Bl -tag -width directory
30.It Fl c
31Clears the dump, so that future invocations of
32.Nm savecore
33will ignore it.
34.It Fl f
35Forces a dump to be taken even if the dump doesn't appear correct or there
36is insufficient disk space.
37.It Fl N
38Use
39.Ar system
40as the kernel instead of the default ``/vmunix''.
41.It Fl v
42Prints out some additional debugging information.
43.It Fl z
44Compresses the core dump and kernel (see
45.Xr compress 1 ).
46.El
47.Pp
48.Nm Savecore
49checks the core dump in various ways to make sure that it is current and
50that it corresponds to the currently running system.
51If it passes these checks, it saves the core image in
52.Ar directory Ns Pa /vmcore.#
53and the system in
54.Ar directory Ns Pa /vmunix.#
55The ``#'' is the number from the first line of the file
56.Ar directory Ns Pa /bounds ,
57and it is incremented and stored back into the file each time
58.Nm savecore
59successfully runs.
60.Pp
61.Nm Savecore
62also checks the available disk space before attempting to make the copies.
63If there is insufficient disk space in the filesystem containing
64.Ar directory ,
65or if the file
66.Ar directory Ns Pa /minfree
67exists and the number of free kilobytes (for non-superusers) in the
68filesystem after the copies were made would be less than the number
69in the first line of this file, the copies are not attempted.
70.Pp
71If
72.Nm savecore
73successfully copies the kernel and the core dump, the core dump is cleared
74so that future invocations of
75.Nm savecore
76will ignore it.
77.Pp
78.Nm Savecore
79is meant to be called near the end of the initialization file
80.Pa /etc/rc
81(see
82.Xr rc 8 ) .
83.Sh FILES
84.Bl -tag -width /vmunixxx -compact
85.It Pa /vmunix
86current
87.Tn UNIX
88.El
89.Sh BUGS
90The minfree code does not consider the effect of compression.
91.Sh SEE ALSO
92.Xr compress 1 ,
93.Xr syslogd 8
94.Sh HISTORY
95The
96.Nm
97command appeared in
98.Bx 4.1 .
99