xref: /csrg-svn/sbin/savecore/savecore.8 (revision 61545)
1*61545Sbostic.\" Copyright (c) 1980, 1991, 1993
2*61545Sbostic.\"	The Regents of the University of California.  All rights reserved.
318920Smckusick.\"
443803Strent.\" %sccs.include.redist.man%
518920Smckusick.\"
6*61545Sbostic.\"     @(#)savecore.8	8.1 (Berkeley) 06/05/93
736188Sbostic.\"
847464Scael.Dd
947464Scael.Dt SAVECORE 8
1047464Scael.Os BSD 4
1147464Scael.Sh NAME
1247464Scael.Nm savecore
1347464Scael.Nd "save a core dump of the operating system"
1447464Scael.Sh SYNOPSIS
1547464Scael.Nm savecore
1656985Sbostic.Fl c
1754912Sleres.Nm savecore
1856985Sbostic.Op Fl fvz
1956985Sbostic.Op Fl N Ar system
2056985Sbostic.Ar directory
2147464Scael.Sh DESCRIPTION
2247464Scael.Nm Savecore
2356985Sbosticcopies the currently running kernel and its associated core dump into
2456985Sbostic.Fa directory ,
2556985Sbosticand enters a reboot message and information about the core dump into
2656985Sbosticthe system log.
2747464Scael.Pp
2856985SbosticThe options are as follows:
2956985Sbostic.Bl -tag -width directory
3054912Sleres.It Fl c
3156985SbosticClears the dump, so that future invocations of
3256985Sbostic.Nm savecore
3356985Sbosticwill ignore it.
3454912Sleres.It Fl f
3556985SbosticForces a dump to be taken even if the dump doesn't appear correct or there
3656985Sbosticis insufficient disk space.
3756985Sbostic.It Fl N
3856985SbosticUse
3956985Sbostic.Ar system
4056985Sbosticas the kernel instead of the default ``/vmunix''.
4154912Sleres.It Fl v
4256985SbosticPrints out some additional debugging information.
4356985Sbostic.It Fl z
4456985SbosticCompresses the core dump and kernel (see
4556985Sbostic.Xr compress 1 ).
4654912Sleres.El
4754912Sleres.Pp
4856985Sbostic.Nm Savecore
4956985Sbosticchecks the core dump in various ways to make sure that it is current and
5056985Sbosticthat it corresponds to the currently running system.
5156985SbosticIf it passes these checks, it saves the core image in
5256985Sbostic.Ar directory Ns Pa /vmcore.#
5356985Sbosticand the system in
5456985Sbostic.Ar directory Ns Pa /vmunix.#
5556985SbosticThe ``#'' is the number from the first line of the file
5656985Sbostic.Ar directory Ns Pa /bounds ,
5756985Sbosticand it is incremented and stored back into the file each time
5856985Sbostic.Nm savecore
5956985Sbosticsuccessfully runs.
6047464Scael.Pp
6147464Scael.Nm Savecore
6256985Sbosticalso checks the available disk space before attempting to make the copies.
6356985SbosticIf there is insufficient disk space in the filesystem containing
6456985Sbostic.Ar directory ,
6556985Sbosticor if the file
6656985Sbostic.Ar directory Ns Pa /minfree
6756985Sbosticexists and the number of free kilobytes (for non-superusers) in the
6856985Sbosticfilesystem after the copies were made would be less than the number
6956985Sbosticin the first line of this file, the copies are not attempted.
7056985Sbostic.Pp
7156985SbosticIf
7247464Scael.Nm savecore
7356985Sbosticsuccessfully copies the kernel and the core dump, the core dump is cleared
7456985Sbosticso that future invocations of
7556985Sbostic.Nm savecore
7656985Sbosticwill ignore it.
7747464Scael.Pp
7847464Scael.Nm Savecore
7956985Sbosticis meant to be called near the end of the initialization file
8056985Sbostic.Pa /etc/rc
8147464Scael(see
8256985Sbostic.Xr rc 8 ) .
8347464Scael.Sh FILES
8447464Scael.Bl -tag -width /vmunixxx -compact
8547464Scael.It Pa /vmunix
8647464Scaelcurrent
8747464Scael.Tn UNIX
8847464Scael.El
8959921Storek.Sh BUGS
9059921StorekThe minfree code does not consider the effect of compression.
9156985Sbostic.Sh SEE ALSO
9256985Sbostic.Xr compress 1 ,
9356985Sbostic.Xr syslogd 8
9447464Scael.Sh HISTORY
9547464ScaelThe
9647464Scael.Nm
9747464Scaelcommand appeared in
9847464Scael.Bx 4.1 .
99