HP-UX Reference (11i v1 05/09) - 1M System Administration Commands N-Z (vol 4)
s
savecrash(1M) savecrash (1M)
NAME
savecrash - save a crash dump of the operating system
SYNOPSIS
/sbin/savecrash
[-cflprvzZ][-D dumpdevice -O offset][
-d sysfile]
[
-m minfree][-s chunksize][
-t tapedevice]
[
-w NOSWAPSWAPEACHSWAPEND][dirname]
DESCRIPTION
savecrash saves the crash dump information of the system (assuming one was made when the system
crashed) and writes a reboot message in the shutdown log file.
dirname is the name of the existing directory in which to store the crash dump; the default is
/var/adm/crash
.
savecrash saves the crash image and related files in the directory dirname
/crash.n. The trailing n
in the directory name is a number that increases by one every time
savecrash is run with the same dir-
name. This number is kept in the file dirname
/bounds, which is created if it does not already exist.
Usually,
savecrash creates the INDEX file in the crash directory from the crash dump header, copies
all kernel modules that were loaded in memory at the time of the crash, and copies all dump device con-
tents into crash image files.
When savecrash writes out a crash dump directory, it checks the space available on the file system con-
taining dirname. savecrash will not use that portion of the file system space which is reserved for the
superuser. Additional space on the file system can be reserved for other uses with -m
minfree, where min-
free is the amount of additional space to reserve. This option is useful for ensuring enough file system
space for normal system activities after a panic.
If there is insufficient space in the file system for the portions of the crash dump that need to be saved,
savecrash will save as much as will fit in the available space. (Priority is given to the index file, then to
the kernel module files, and then to the physical memory image.) The dump will be considered saved, and
savecrash will not attempt to save it again, unless there was insufficient space for any of the physical
memory image. (See the description of option
-r.)
savecrash also writes a reboot message in the shutdown log file (/etc/shutdownlog
), if one exists.
(If a shutdown log file does not exist,
savecrash does not create one.) If the system crashes as a result
of a kernel panic, savecrash also records the panic string in the shutdown log.
By default, when the primary paging device is not used as one of the dump devices or after the crash image
on the primary paging device has been saved, savecrash runs in the background. This reduces system
boot-up time by allowing the system to be run with only the primary paging device.
It is possible for dump devices to be used also as paging devices. If savecrash determines that a dump
device is already enabled for paging, and that paging activity has already taken place on that device, a
warning message will indicate that the dump may be invalid. If a dump device has not already been
enabled for paging,
savecrash prevents paging from being enabled to the device by creating the file
/etc/savecore.LCK
. swapon does not enable the device for paging if the device is locked in
/etc/savecore.LCK
(see swapon(1M) for more details). As savecrash finishes saving the image
from each dump device, it updates the
/etc/savecore.LCK file and optionally executes swapon to
enable paging on the device.
Options
-c Mark the dump in the dump device as saved, without performing any other action. The -c option
is useful for manually inhibiting dump actions called by /sbin/init.d/savecrash.
-f Run savecrash in the foreground only. By default, savecrash runs in the background when
the primary paging device does not contain an unsaved portion of the crash image. Turning this
option on increases system boot-up time, but guarantees that the dump has been saved when con-
trol returns to the caller.
-l Logs the panic information to /etc/shutdownlog as described above, but does not actually
save the dump. The dump is marked as saved so that future invocations of savecrash do not
create duplicate log entries.
-p Only preserves swap-endangered dump device contents into crash image files. Swap-endangered
dump devices are those devices that are also configured as swap devices by the system. If all dump
Section 1M−−808 Hewlett-Packard Company − 1 − HP-UX 11i Version 1: September 2005