savecore(8) — Maintenance
NAME
savecore - Saves a core dump of the operating system
SYNOPSIS
savecore [-cefv] directory
The savecore command saves the most recent core dump of the system and writes a reboot message in the shutdown log.
FLAGS
-cDoes not copy the dump, but simply marks it invalid.
-eSaves only the kernel syslog and binary event log buffers from the dump. If this flag is specified, core or namelist images are not saved.
-fCopies the dump even if it is old or there is insufficient filesystem space to save it.
-vPrints more verbose information.
DESCRIPTION
The savecore command is usually invoked during system startup (before the dump partition is accessed).
The savecore command checks to determine whether a dump has been made recently (within the last three days) and that there is enough space to save it (see the following information about minfree). These conditions are overridden by the -f flag.
Both the dump and the kernel are saved to files in directory under the names vmcore.n and vmunix.n, respectively. The variable n is the number specified by the file directory/bounds and incremented by savecore. If this value does not exist, it is created and initialized with the value 0.
The file directory/minfree specifies the minimum number of kilobytes (default is 0) left on the filesystem containing directory after the dump is taken.
The savecore command also logs a reboot message using the facility LOG_CRIT (see syslog(3)). If the system crashed as a result of a panic, savecore also logs the panic string.
The savecore command attempts to save the kernel syslog and binary event log buffers from the dump. The msgbuf.err entry in /etc/syslog.conf file and the dumpfile entry in the /etc/binlog.conf file specify the buffer file names and locations. The default file specifications are as follows:
msgbuf.err /var/adm/crash/msgbuf.savecore
dumpfile /var/adm/crash/binlogdumpfile
If the msgbuf.err or dumpfile entry is not specified in the /etc/syslog.conf or /etc/binlog.conf file, respectively, the buffer is not saved. You cannot specify that a buffer be saved by forwarding it to any system.
The syslog messages or binary event log records that were not processed due to a system crash are recovered on the subsequent reboot. The savecore command runs during the system reboot, checks for the presence of a system core dump, and saves the syslog and binary event log buffers.
When the syslogd and binlogd daemons are initialized, they check for the saved buffer files; if found, the daemons process the files and then delete them.
The default location for saving crash dumps is /var/adm/crash. This can be overridden as follows:
/usr/sbin/rcmgr set SAVECORE_DIR directory
The default behavior of savecore is to return to single-user mode if it is unable to save a core dump because of insufficient filesystem space. This feature can be disabled as follows:
/usr/sbin/rcmgr set SAVECORE_FLAGS M
FILES
/usr/savecore
Specifies the command path.
directory/bounds
Specifies the number of next dump files.
directory/minfree
Specifies the minimum number of kilobytes to be left after a dump.
RELATED INFORMATION
Functions: syslog(3)