SAVECORE(1M) — Series 800 Only
NAME
savecore − save a core dump of the operating system
SYNOPSIS
/etc/savecore [ −nvcp ] [ −d dumpsystem ] dirname [ system ]
DESCRIPTION
Savecore saves a core dump of the system (assuming one was made when the system crashed) and writes a reboot message in the shutdown log file. Savecore should be executed toward the end of the /etc/rc file.
Dirname is the name of the existing directory in which to store the core dump.
System is the name of a file containing the image of the current running system, that is, the system that is running when savecore is executed. If system is not specified, /hp-ux is assumed.
Savecore checks the core dump to verify that it corresponds to dumpsystem. If it does, savecore saves the core image in the file dirname/hp-core.n and a copy of dumpsystem, which contains the namelist, in the file dirname/hp-ux.n. The trailing n in the path names is a number that increases by one every time savecore is run in that directory. This number is kept in the file dirname/bounds, which is created if it does not already exist.
Before savecore writes out a core image, it reads a number from the file dirname/minfree. The core dump is not done if the number of free 512-byte blocks on the file system that contains dirname is less than the number obtained from the minfree file. If minfree does not exist, savecore always writes out the core file. Note that repeated system crashes can result in multiple core files that consume large quantities of disk space, especially on machines with large physical memories.
Savecore also writes a reboot message in the shutdown log file, if one exists. (If a shutdown log file does not exist, savecore does not create one.) If the system crashes as a result of a panic, savecore also records the panic string in the shutdown log.
Options
−n No copy of the dumpsystem is saved in dirname/hp-ux.n. If −n is used, the user must remember which file system (for example, /hp-ux) corresponds to the saved core file. The core file alone is not very useful.
−v Additional messages are printed under some conditions. This option is usually used only for debugging.
−c Clear the dump device flag to indicate that the device no longer contains any useful dump information. The −c option is useful for manually inhibiting dump actions called by /etc/rc.
−p Execute a partial dump. The destination file accepts as much of the dump as disk space allows, then clears the dump device flag as though the entire dump succeeded. This is useful when disk space is very low, but some information is still desired.
−d dumpsystem Dumpsystem is the name of a file containing the image of the system that produced the core dump (that is, the system running when the crash occurred). If −d is not specified, savecore assumes dumpsystem is identical to system. This option is used when the system booted to save the core dump differs from the system that crashed. This is usually necessary only when debugging new systems that are not stable enough to boot and run savecore.
RETURN VALUE
Savecore returns the following exit status values:
0 A core dump was found and saved.
1 A core dump could not be saved due to an error or minfree limitation.
2 No core dump was found to save.
WARNINGS
Some implementations place the core dump in the disk swap area while the system reboots. On such systems, if too many programs are swapped out before savecore is run, savecore might be unable to recover the crash dump.
Savecore cannot recover the crash dump if more than three days have elapsed since the crash occurred. In this case, savecore displays the message, "Dump time is unreasonable."
When the −d option is specified, some implementations require that system and dumpsystem be configured similarly. For example, with some implementations swap devices must be identically configured, and the amount of physical memory in the system must not change between the time of the crash and the running of savecore.
AUTHOR
Savecore was developed by HP and the University of California, Berkeley.
FILES
/hp-ux current system
/usr/adm/shutdownlog shutdown log
dirname/bounds crash dump number
dirname/minfree minimum free blocks on file system
SEE ALSO
Hewlett-Packard Company — HP-UX Release 7.0: Sept 1989