1994-05-26 06:35:07 +00:00
|
|
|
.\" Copyright (c) 1980, 1991, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
1994-09-24 00:08:43 +00:00
|
|
|
.\" From: @(#)savecore.8 8.1 (Berkeley) 6/5/93
|
1999-08-28 00:22:10 +00:00
|
|
|
.\" $FreeBSD$
|
1994-05-26 06:35:07 +00:00
|
|
|
.\"
|
1994-09-24 00:08:43 +00:00
|
|
|
.Dd September 23, 1994
|
1994-05-26 06:35:07 +00:00
|
|
|
.Dt SAVECORE 8
|
2001-07-10 11:04:34 +00:00
|
|
|
.Os
|
1994-05-26 06:35:07 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm savecore
|
|
|
|
.Nd "save a core dump of the operating system"
|
|
|
|
.Sh SYNOPSIS
|
2000-11-20 16:52:27 +00:00
|
|
|
.Nm
|
1994-05-26 06:35:07 +00:00
|
|
|
.Fl c
|
2000-11-20 16:52:27 +00:00
|
|
|
.Nm
|
2003-09-04 10:07:01 +00:00
|
|
|
.Fl C
|
|
|
|
.Op Fl v
|
|
|
|
.Op Ar directory device
|
|
|
|
.Nm
|
2001-02-16 16:28:36 +00:00
|
|
|
.Op Fl fkvz
|
2002-05-05 01:04:00 +00:00
|
|
|
.Op Ar directory Op Ar device ...
|
1994-05-26 06:35:07 +00:00
|
|
|
.Sh DESCRIPTION
|
2002-05-29 16:53:27 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility
|
2002-05-05 01:04:00 +00:00
|
|
|
copies a core dump into
|
2002-05-29 16:53:27 +00:00
|
|
|
.Ar directory ,
|
2002-05-05 01:04:00 +00:00
|
|
|
or the current working directory if no
|
2002-05-29 16:53:27 +00:00
|
|
|
.Ar directory
|
2002-05-05 01:04:00 +00:00
|
|
|
argument is given,
|
1994-05-26 06:35:07 +00:00
|
|
|
and enters a reboot message and information about the core dump into
|
|
|
|
the system log.
|
|
|
|
.Pp
|
|
|
|
The options are as follows:
|
1998-07-28 06:38:57 +00:00
|
|
|
.Bl -tag -width indent
|
2003-09-04 10:07:01 +00:00
|
|
|
.It Fl C
|
|
|
|
Check to see if a dump exists,
|
|
|
|
and display a brief message to indicate the status.
|
|
|
|
An exit status of 0 indicates that a dump is there,
|
|
|
|
1 indicates that none exists.
|
|
|
|
This option is compatible only with the
|
|
|
|
.Op Fl v
|
|
|
|
option.
|
1994-05-26 06:35:07 +00:00
|
|
|
.It Fl c
|
1998-07-28 06:38:57 +00:00
|
|
|
Clear the dump, so that future invocations of
|
|
|
|
.Nm
|
1994-05-26 06:35:07 +00:00
|
|
|
will ignore it.
|
|
|
|
.It Fl f
|
2005-02-24 02:45:10 +00:00
|
|
|
Force a dump to be taken even if either the dump was cleared or if the
|
|
|
|
dump header information is inconsistent.
|
2001-02-16 16:28:36 +00:00
|
|
|
.It Fl k
|
|
|
|
Do not clear the dump after saving it.
|
1994-05-26 06:35:07 +00:00
|
|
|
.It Fl v
|
1998-07-28 06:38:57 +00:00
|
|
|
Print out some additional debugging information.
|
2005-06-06 06:47:33 +00:00
|
|
|
Specify twice for more information.
|
1994-05-26 06:35:07 +00:00
|
|
|
.It Fl z
|
1998-07-28 06:38:57 +00:00
|
|
|
Compress the core dump and kernel (see
|
2001-09-06 09:30:09 +00:00
|
|
|
.Xr gzip 1 ) .
|
1994-05-26 06:35:07 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
2002-05-29 16:53:27 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility
|
2002-05-05 01:04:00 +00:00
|
|
|
looks for dumps on each device specified by the
|
|
|
|
.Ar device
|
|
|
|
argument(s), or on each device in
|
|
|
|
.Pa /etc/fstab
|
2002-05-29 16:53:27 +00:00
|
|
|
marked as
|
|
|
|
.Dq dump
|
|
|
|
or
|
|
|
|
.Dq swap .
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility
|
2002-05-05 01:04:00 +00:00
|
|
|
checks the core dump in various ways to make sure that it is complete.
|
1994-05-26 06:35:07 +00:00
|
|
|
If it passes these checks, it saves the core image in
|
|
|
|
.Ar directory Ns Pa /vmcore.#
|
2002-05-05 01:04:00 +00:00
|
|
|
and information about the core in
|
|
|
|
.Ar directory Ns Pa /info.#
|
1994-05-26 06:35:07 +00:00
|
|
|
The ``#'' is the number from the first line of the file
|
|
|
|
.Ar directory Ns Pa /bounds ,
|
|
|
|
and it is incremented and stored back into the file each time
|
1998-07-28 06:38:57 +00:00
|
|
|
.Nm
|
1994-05-26 06:35:07 +00:00
|
|
|
successfully runs.
|
|
|
|
.Pp
|
2002-05-29 16:53:27 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility
|
1994-05-26 06:35:07 +00:00
|
|
|
also checks the available disk space before attempting to make the copies.
|
2002-08-21 18:11:48 +00:00
|
|
|
If there is insufficient disk space in the file system containing
|
1994-05-26 06:35:07 +00:00
|
|
|
.Ar directory ,
|
|
|
|
or if the file
|
|
|
|
.Ar directory Ns Pa /minfree
|
|
|
|
exists and the number of free kilobytes (for non-superusers) in the
|
2002-08-21 18:11:48 +00:00
|
|
|
file system after the copies were made would be less than the number
|
1994-05-26 06:35:07 +00:00
|
|
|
in the first line of this file, the copies are not attempted.
|
|
|
|
.Pp
|
|
|
|
If
|
1998-07-28 06:38:57 +00:00
|
|
|
.Nm
|
1994-05-26 06:35:07 +00:00
|
|
|
successfully copies the kernel and the core dump, the core dump is cleared
|
|
|
|
so that future invocations of
|
1998-07-28 06:38:57 +00:00
|
|
|
.Nm
|
1994-05-26 06:35:07 +00:00
|
|
|
will ignore it.
|
|
|
|
.Pp
|
2002-05-29 16:53:27 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility
|
1994-05-26 06:35:07 +00:00
|
|
|
is meant to be called near the end of the initialization file
|
|
|
|
.Pa /etc/rc
|
|
|
|
(see
|
|
|
|
.Xr rc 8 ) .
|
|
|
|
.Sh SEE ALSO
|
2001-09-06 09:30:09 +00:00
|
|
|
.Xr gzip 1 ,
|
2001-09-11 09:58:34 +00:00
|
|
|
.Xr getbootfile 3 ,
|
2001-10-28 16:41:56 +00:00
|
|
|
.Xr dumpon 8 ,
|
1994-05-26 06:35:07 +00:00
|
|
|
.Xr syslogd 8
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
2002-07-06 19:35:14 +00:00
|
|
|
utility appeared in
|
1994-05-26 06:35:07 +00:00
|
|
|
.Bx 4.1 .
|
2005-01-18 10:09:38 +00:00
|
|
|
.Sh BUGS
|
|
|
|
The minfree code does not consider the effect of compression or sparse files.
|