savecore(1M) SYSTEM ADMINISTRATION COMMANDS savecore(1M)
NAME
savecore - save system images after a crash
SYNOPSIS
savecore [options] [dumpdevice] [savefile]
DESCRIPTION
savecore is used to save system images after the machine has
crashed. The script /etc/rc2.d/S11SAVECORE is executed when
bringing the machine up to multiuser mode. This script
invokes savecore to detect when a system image is present on
the dump device and, optionally, to save the image into a
file in the file system.
The script is controlled by the file /etc/default/savecore,
which contains four parameters that may be set by the system
administrator:
DUMPFILE=name_of_dump_device
SAVEFILE=name_of_save_file
TIMEOUT=input_delay
PROMPT={yes|no}
The parameters are optional and may be either omitted or
commented out by placing a # character in column 1.
DUMPFILE is used to specify the name of the dump device.
That is, the device on which a system image may be present.
If not specified, the script uses a default of /dev/dump.
The script interrogates this device to determine if an image
is present. If no image is present, the script terminates.
SAVEFILE is used to specify the name of the file within the
file system to store system images. If the name is ABORT no
system images are saved and the image on the dump device is
marked invalid. If the name is the null string
SAVEFILE=
or if the SAVEFILE line is omitted or commented out, the
script prompts on standard input for a save_file name. Any
other value is used as the name of the save_file.
TIMEOUT is used to set the period, in seconds, that the
script waits for input before taking default action. (The
action taken is controlled by other parameters.) If this is
set to 0, no prompt is displayed, regardless of the value of
the PROMPT parameter.
If PROMPT is set to yes and TIMEOUT is not 0, the
S11SAVECORE script prompts for the name of the file in which
to store the system image. If PROMPT is set to no and a
1
savecore(1M) SYSTEM ADMINISTRATION COMMANDS savecore(1M)
file name has been specified for SAVEFILE, the script
immediately begins the save without prompting the user. If
the SAVEFILE is left unspecified, a prompt is displayed. If
no input is received withing TIMEOUT seconds, the script
proceeds automatically.
At the prompt, a user may enter either ABORT, <Return> or an
ASCII string. If ABORT is entered, the image is not saved
and the image on the dump device is marked invalid. If
<Return> is entered, the image is not saved but the image on
the dump device is untouched. Any other input is used as
the name of the file in which to save the image.
savecore itself may be executed in the following ways:
% savecore -m
% savecore -v dump_device
% savecore -c dump_device
% savecore dump_device save_file
When called with the -m option, savecore prints on standard
output the size of physical memory in MBytes.
When called with the -v option, savecore determines the
presence of a system image on the dump device. It returns
an exit status of 0 if an image is present; anything else
indicates no image has been dumped.
When called with the -c option, savecore clears the indica-
tion on the dump device that a system image exists. A sub-
sequent savecore will no longer find an image on the device.
NOTE
If the dump device (/dev/dump) is a cartridge tape,
savecore does not clear the indication that a system
image exists.
When called with no options, savecore attempts to copy the
system image from the dump device to the named file. Note
that it first verifies the existence of a dump image and
marks the dump as invalid.
2