The savecore utility saves a crash dump of the kernel (assuming that one was made) and writes a reboot message in the shutdown log. It is invoked by the /etc/init.d/savecore file after the system boots, if savecore is enabled by way of dumpadm(1M). savecore is enable on reboot by default.
The savecore utility checks the crash dump to be certain it corresponds with the version of the operating system currently running. If it does, savecore saves the crash dump data in the file directory/vmcore.n and the kernel's namelist in directory/unix.n. The trailing .n in the pathnames is replaced by a number which grows every time savecore is run in that
directory.
Before writing out a crash dump, savecore reads a number from the file directory/minfree. This is the minimum number of kilobytes that must remain free on the file system containing directory. If after saving
the crash dump the file system containing directory would have less free space the number of kilobytes specified in minfree, the crash dump is not saved. if the minfree file does not exist, savecore assumes a minfree value of 1 megabyte.
The savecore utility also logs a reboot message using facility LOG_AUTH (see syslog(3C)). If
the system crashed as a result of a panic, savecore logs the panic string too.
|