savecore - Copies a core dump from swap partitions to a file
savecore [-cdefv] directory
The savecore command saves the most recent core dump in a file and writes messages to system logs.
Clears any core dumps from the swap partitions without saving the dump. Specifies the full pathname of the partition that contains the dump header. This flag is useful when the dump header is stored in a partition other than the primary swap partition. This situation can occur, for example, if you are analyzing the crash dump of a test kernel using another, more reliable kernel from a different boot device. Saves only the kernel message buffer and binary event log buffers from the dump. If this flag is specified, other information in the crash dump, such as the copy of physical memory, is not saved. Copies the dump even if there is insufficient filesystem space to save it. Only the portion of the dump that fits in the space available is copied. Displays messages about the operation of savecore (verbose flag).
The savecore command is usually invoked during system startup. The command determines whether a crash dump has been made and that there is enough file system space to save it (see the following information about minfree). If you specify the -f flag, savecore copies the dump even if there is insufficient file space. In this case, only a portion of the dump is saved into the crash dump file.
The savecore command writes information in directory. By default, directory is /var/adm/crash.
The crash dump contains the contents of a portion of physical memory (or all of physical memory in the case of a full crash dump) at the time of the crash. The savecore command saves this information in the file vmzcore.n for a compressed dump, or vmcore.n for an uncompressed dump. Compressed dumps are produced by default and detected automatically by savecore. Compression can be disabled if required and either file type can be read by savecore.
The command also copies the kernel executable image, usually /vmunix, to the vmunix.n file. You analyze the vmzcore.n and vmunix.n files to determine the cause of the crash. (See the Kernel Debugging manual for information about analyzing crash dump files.)
The variable n indicates the number of the crash. For the first crash, savecore creates the files vmunix.0 and vmzcore.0. It then creates a file named directory/bounds and initializes the file with the value 1. For each succeeding crash, the savecore command uses the value in the directory/bounds file and then increments that value.
The file directory/minfree specifies the minimum number of kilobytes that must be left on the filesystem containing directory after savecore copies the crash dump. By default, this file does not exist, indicating that no minimum is set. To specify a minimum, create the file and store the number of kilobytes you want reserved in it. You can override the setting in directory/minfree using the -f flag.
In addition to saving the crash dump, the savecore command writes a reboot message to the /var/adm/syslog/auth.log file. If the system crashed as a result of a panic, savecore includes the panic string in that log file. You can cause savecore to write the message to another file by modifying the auth facility entry in the /etc/syslog.conf file. See the syslogd(8) reference page for information about modifying that file.
The savecore command also attempts to save the kernel message buffer and binary event log buffers from the dump. The kernel message buffer is saved in the /var/adm/crash/msgbuf.savecore file, by default. The binary event log buffer is saved in the /var/adm/crash/binlogdumpfile file by default. When the syslogd and binlogd daemons are initialized later during system startup, they check for the saved buffer files. The daemons process and delete the files.
You can change the location to which savecore writes the kernel message buffer and binary event log. To change the location for saving the kernel message buffer, modify the msgbuf.err entry in the /etc/syslog.conf file. To change the location for saving the binary event log, modify the dumpfile entry in the /etc/binlog.conf file. If you remove either the msgbuf.err or dumpfile entry from the configuration files, savecore does not save the corresponding buffer. For most entries, the /etc/syslog.conf and /etc/binlog.conf files allow you to forward messages to another system. However, you cannot specify a forwarding address in the msgbuf.err and dumpfile entries. For more information, see syslogd(8) and binlogd(8).
The default location for saving crash dump files is /var/adm/crash. To modify the default location, issue the following command:
/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
Specifies the command path. Specifies the number of the next dump Specifies the minimum number of kilobytes to be left after crash dump files are written System logging configuration file Binary logging configuration file
Daemons: binlogd(8), syslogd(8)
Kernel Debugging delim off