Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dd(1)

uerf(8)

savecore(8)

Name

savecore − save a core dump of the operating system

Syntax

/etc/savecore [ options ] dirname [ system ] [ corename ]

Description

The savecore command is meant to be called near the end of the /etc/rc.local file.  The savecore command saves the core dump of the system (assuming one was made) and writes a reboot message in the shutdown log.

The savecore command checks the core dump to be certain it corresponds with the current running ULTRIX.  If it does, it saves the core image in the file dirname/vmcore.n and saves the namelist in the file dirname/vmunix.n.  The trailing .n in the pathnames is replaced by a number which increments each time savecore is run in that directory.

After saving the core and namelist images, savecore will save the error logger buffer into a predetermined file.  The error logger buffer contains information about why the crash occurred.  After savecore completes, the elcsd daemon will extract the error logger file and translate its contents into a form familiar to the uerf() program.

Before savecore writes out a core image, it reads a number from the file dirname/minfree.  If there are fewer free blocks on the filesystem that contains dirname than the number obtained from the minfree file, a core dump is not done. If the minfree file does not exist, savecore always writes out the core file (assuming that a core dump was taken).

The savecore command also writes a reboot message in the shut down log. If the system crashed as a result of a panic, savecore also records the panic string in the shut down log.

For partial crash dumps, savecore creates a sparse core image file in dirname/vmcore.n.  If this sparse core image file is copied or moved to another location, the file expands to its true size which can take too much file system space.  Hence, to copy or move sparse core image files, you must use the dd command. The dd command has a conversion option to create sparse output files.

Options

−cClears the core dump.  This option is useful when the core dump is corrupted in a way that will not allow savecore to save it safely.  Use the −c option with caution, because once it clears the core dump, the core dump cannot be retrieved.

−d dumpdev dumplo
Specifies the dump device and the dump offset when running savecore on a system image other than the currently running system image. The savecore program assumes that the running system image is /vmunix and it reads the dump device and dump device offset are different in the system image that crashed, the −d option provides the correct dump device and dump device offset.

−eSaves only the error logger buffer into a file.  If used, core or namelist images are not saved. 

−f corename
Takes the i corefile name as the file from which to extract the the crash dump data instead of the default dump device.  This option is used only for diskless workstations. 

If the core dump was from a system other than /vmunix, the name of that system must be supplied as system. The savecore program assumes that the running image is /vmunix.

After successful completion, the core dump is cleared.  Also, a message is written in the file /usr/adm/shutdownlog which tells whether the dump succeeded or failed.

Files

/usr/adm/shutdownlog
Shut down log

/vmunix Current running ULTRIX system

See Also

dd(1), uerf(8)

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