3-38 Troubleshooting
HP-UX Automatic Core Dump
As HP-UX reboots following a system panic, the computer may save a core file to disk. This core file is a
snapshot of physical memory at the time of the panic. If it becomes necessary, this core file can be analyzed
using special tools to determine more about what caused the panic. Saving a core file is a two-part process:
1. After the panic occurs, the HP-UX kernel writes an image of its physical memory onto the dump
device. This is the core file (crash file). By default, the dump device is the primary swap device.
2. Usually when the core dump is complete, the system will attempt to reboot the system. During
reboot, HP-UX will attempt to save the previously created core file (on the dump device) into the
/var/adm/crash
directory on disk.
Specifically, the
/etc/rc.log bootup script runs savecore (1M), the command for saving the core file and the
/stand/vmunix file to disk. By default, the /etc/rc.log script specifies the target directory as /var/adm/crash.
The two files copied by savecore are named:
•
vmunix.n (a copy of the original kernel, /stand)
• vmcore.n (a copy of the physical memory image).
Together these two files make up a core dump pair. The n in the file names is a number assigned to a
particular core dump pair.
What To Do With Core Files
The core files created by savecore are very big (the same size as the system physical memory). If you know
why the system panic occurred, you can delete the core files.
If you feel you need to save these files for future analysis, it is best to save them to tape and remove them
from your file system in order to free up space. Troubleshooting difficult problems (especially intermittent
problems) often requires two or more core files.
Problems With Automatic Memory Dump
The following conditions may prevent the automatic memory dump from succeeding:
• The savecore command line has been commented out or removed from the /etc/rc.log script.
• The directory in which savecore has been told to put the crash file does not exist. By default this
directory is
/var/adm/crash.
• There is not enough room in the dump device(s) or in the partition that savecore is told to use. If the
dump device is too small to contain the image of physical memory, the dump will be only partially
saved and may not be useful for troubleshooting a specific problem.
NOTE
This directory is not automatically created during install.