Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

logger(1)

nvram(1M)

rsh(1C)

compress(1)

savecrash(8C)  —  Kubota Pacfic Computer Inc. (System Maintenance Utilities)

 

NAME

savecrash − Save system crash images created by sysdump

SYNOPSIS

/etc/init.d/savecrash
/etc/rc2.d/S31savecrash
/etc/dumpspace hostname

DESCRIPTION

savecrash is a shell script that is automatically run when the machine is brought to multi-user mode.  It attempts to save any system crash images that a user generated via the prom command sysdump to the nvram(1M) defined dumpdev. It attempts to save a compressed copy of the system crash image, if there exists a /usr/ucb/compress(1) command. 

If there is a nvram variable dumphost defined, savecrash will attempt to save the image to that machine. It will invoke on the machine dumphost, via rsh(1), the command /etc/dumpspace with its own hostname as the argument.  Dumpspace(8c), another shell script, allows the owner of the dumphost machine to specify where crash images from the various machines that might crash will be saved. Dumpspace returns a string specifing the amount of space in kilobytes, and a pathname to a directory where the requesting machine can create a copy of the system crash image. 

By default, dumpspace specifies that all system crash images be created in the directory /dumps/hostname, but of course, this can be configured as desired by editing the script. 

Savecrash then determines the size of the crash image it intends to create.  If there is sufficient space on the dumphost, savecrash creates the crash image in a file named hostnameMMDD[.Z] (where MM is the numerical month and DD is the numerical day of the present date of the machine that crashed; and .Z is tacked on if it was possible to create a compressed crash image) in the specified directory via a rsh(1) command. 

If dumphost is not defined in nvram, dumphost does not have enough space, or some error occurs writing to dumphost, savecrash then attempts to create creating the dump in /usr/adm/crash. If there is space available, it creates a system image in the file /usr/adm/crash/hostnameMMDD[.Z] (where MM is the numerical month and DD is the numerical day of the present date of the machine that crashed; and .Z is tacked on if it was possible to create a compressed crash image). 

If copying to dumphost was not possible, and there is not enough space in /usr/adm/crash, savecrash asks the user at the system console whether to dump the image to a cartridge tape.  If the user does not answer ’y’, or does not answer at all within 30 seconds, the system image is not copied, and the init 2 process continues.  If the user answers ’y’, that user is then prompted to insert a tape and type return when the tape is inserted.  Once a tape has been inserted, savecrash copies a (compressed if possible) crash image to the cartridge tape drive.  Savecore will keep prompting a user until a writable tape is correctly inserted into the tape drive.  The user is informed that hitting the interrupt character (usually ^C or DEL) will abort the savecrash process. 

All signifigent actions of savecrash are logged to /usr/adm/messages via logger(1). Additionally, mail is sent to postmaster summarizing savecrash’s actions. 

SEE ALSO

logger(1), nvram(1M), rsh(1C), compress(1)

BUGS

This program should be unnecessary... 

September 02, 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026