18fae3551SRodney W. Grimes.\" Copyright (c) 1980, 1991, 1993 28fae3551SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 38fae3551SRodney W. Grimes.\" 48fae3551SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 58fae3551SRodney W. Grimes.\" modification, are permitted provided that the following conditions 68fae3551SRodney W. Grimes.\" are met: 78fae3551SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 88fae3551SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 98fae3551SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 108fae3551SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 118fae3551SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 128fae3551SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software 138fae3551SRodney W. Grimes.\" must display the following acknowledgement: 148fae3551SRodney W. Grimes.\" This product includes software developed by the University of 158fae3551SRodney W. Grimes.\" California, Berkeley and its contributors. 168fae3551SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors 178fae3551SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 188fae3551SRodney W. Grimes.\" without specific prior written permission. 198fae3551SRodney W. Grimes.\" 208fae3551SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 218fae3551SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 228fae3551SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 238fae3551SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 248fae3551SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 258fae3551SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 268fae3551SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 278fae3551SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 288fae3551SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 298fae3551SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 308fae3551SRodney W. Grimes.\" SUCH DAMAGE. 318fae3551SRodney W. Grimes.\" 328fae3551SRodney W. Grimes.\" @(#)savecore.8 8.1 (Berkeley) 6/5/93 338fae3551SRodney W. Grimes.\" 348fae3551SRodney W. Grimes.Dd June 5, 1993 358fae3551SRodney W. Grimes.Dt SAVECORE 8 368fae3551SRodney W. Grimes.Os BSD 4 378fae3551SRodney W. Grimes.Sh NAME 388fae3551SRodney W. Grimes.Nm savecore 398fae3551SRodney W. Grimes.Nd "save a core dump of the operating system" 408fae3551SRodney W. Grimes.Sh SYNOPSIS 418fae3551SRodney W. Grimes.Nm savecore 428fae3551SRodney W. Grimes.Fl c 438fae3551SRodney W. Grimes.Nm savecore 448fae3551SRodney W. Grimes.Op Fl fvz 458fae3551SRodney W. Grimes.Op Fl N Ar system 468fae3551SRodney W. Grimes.Ar directory 478fae3551SRodney W. Grimes.Sh DESCRIPTION 488fae3551SRodney W. Grimes.Nm Savecore 498fae3551SRodney W. Grimescopies the currently running kernel and its associated core dump into 508fae3551SRodney W. Grimes.Fa directory , 518fae3551SRodney W. Grimesand enters a reboot message and information about the core dump into 528fae3551SRodney W. Grimesthe system log. 538fae3551SRodney W. Grimes.Pp 548fae3551SRodney W. GrimesThe options are as follows: 558fae3551SRodney W. Grimes.Bl -tag -width directory 568fae3551SRodney W. Grimes.It Fl c 578fae3551SRodney W. GrimesClears the dump, so that future invocations of 588fae3551SRodney W. Grimes.Nm savecore 598fae3551SRodney W. Grimeswill ignore it. 608fae3551SRodney W. Grimes.It Fl f 618fae3551SRodney W. GrimesForces a dump to be taken even if the dump doesn't appear correct or there 628fae3551SRodney W. Grimesis insufficient disk space. 638fae3551SRodney W. Grimes.It Fl N 648fae3551SRodney W. GrimesUse 658fae3551SRodney W. Grimes.Ar system 668fae3551SRodney W. Grimesas the kernel instead of the default ``/vmunix''. 678fae3551SRodney W. Grimes.It Fl v 688fae3551SRodney W. GrimesPrints out some additional debugging information. 698fae3551SRodney W. Grimes.It Fl z 708fae3551SRodney W. GrimesCompresses the core dump and kernel (see 718fae3551SRodney W. Grimes.Xr compress 1 ). 728fae3551SRodney W. Grimes.El 738fae3551SRodney W. Grimes.Pp 748fae3551SRodney W. Grimes.Nm Savecore 758fae3551SRodney W. Grimeschecks the core dump in various ways to make sure that it is current and 768fae3551SRodney W. Grimesthat it corresponds to the currently running system. 778fae3551SRodney W. GrimesIf it passes these checks, it saves the core image in 788fae3551SRodney W. Grimes.Ar directory Ns Pa /vmcore.# 798fae3551SRodney W. Grimesand the system in 808fae3551SRodney W. Grimes.Ar directory Ns Pa /vmunix.# 818fae3551SRodney W. GrimesThe ``#'' is the number from the first line of the file 828fae3551SRodney W. Grimes.Ar directory Ns Pa /bounds , 838fae3551SRodney W. Grimesand it is incremented and stored back into the file each time 848fae3551SRodney W. Grimes.Nm savecore 858fae3551SRodney W. Grimessuccessfully runs. 868fae3551SRodney W. Grimes.Pp 878fae3551SRodney W. Grimes.Nm Savecore 888fae3551SRodney W. Grimesalso checks the available disk space before attempting to make the copies. 898fae3551SRodney W. GrimesIf there is insufficient disk space in the filesystem containing 908fae3551SRodney W. Grimes.Ar directory , 918fae3551SRodney W. Grimesor if the file 928fae3551SRodney W. Grimes.Ar directory Ns Pa /minfree 938fae3551SRodney W. Grimesexists and the number of free kilobytes (for non-superusers) in the 948fae3551SRodney W. Grimesfilesystem after the copies were made would be less than the number 958fae3551SRodney W. Grimesin the first line of this file, the copies are not attempted. 968fae3551SRodney W. Grimes.Pp 978fae3551SRodney W. GrimesIf 988fae3551SRodney W. Grimes.Nm savecore 998fae3551SRodney W. Grimessuccessfully copies the kernel and the core dump, the core dump is cleared 1008fae3551SRodney W. Grimesso that future invocations of 1018fae3551SRodney W. Grimes.Nm savecore 1028fae3551SRodney W. Grimeswill ignore it. 1038fae3551SRodney W. Grimes.Pp 1048fae3551SRodney W. Grimes.Nm Savecore 1058fae3551SRodney W. Grimesis meant to be called near the end of the initialization file 1068fae3551SRodney W. Grimes.Pa /etc/rc 1078fae3551SRodney W. Grimes(see 1088fae3551SRodney W. Grimes.Xr rc 8 ) . 1098fae3551SRodney W. Grimes.Sh FILES 1108fae3551SRodney W. Grimes.Bl -tag -width /vmunixxx -compact 1118fae3551SRodney W. Grimes.It Pa /vmunix 1128fae3551SRodney W. Grimescurrent 1138fae3551SRodney W. Grimes.Tn UNIX 1148fae3551SRodney W. Grimes.El 1158fae3551SRodney W. Grimes.Sh BUGS 1168fae3551SRodney W. GrimesThe minfree code does not consider the effect of compression. 1178fae3551SRodney W. Grimes.Sh SEE ALSO 1188fae3551SRodney W. Grimes.Xr compress 1 , 1198fae3551SRodney W. Grimes.Xr syslogd 8 1208fae3551SRodney W. Grimes.Sh HISTORY 1218fae3551SRodney W. GrimesThe 1228fae3551SRodney W. Grimes.Nm 1238fae3551SRodney W. Grimescommand appeared in 1248fae3551SRodney W. Grimes.Bx 4.1 . 125