|
|
STREAMS/UX for the HP 9000 Reference Manual > Chapter 6 Debugging STREAMS/UX Modules and DriversGenerating and Retrieving System Core Dumps |
|
HP-UX will attempt to create a snapshot of physical memory and register contents before it stops running. This snapshot can assist engineers in determining the cause of the problem because it holds a record of what the system was doing at the time it crashed. The correct name for this snapshot is a core dump. The default location for this snapshot is the primary swap area, but it is possible to configure systems to put the snapshot on another disk device. See the System Administration Tasks manuals for the Series 700 and the Series 800 for information on configuring dump devices. A core dump is composed of two files, a core file and an object file. The core file is an image of the system's physical memory and register contents at the time of a crash. The object file is the kernel file, /stand/vmunix. To retrieve a core dump, the program /usr/sbin/savecore must be executed. savecore will retrieve the core file from the swap device, along with a copy of the system's kernel file, and save both in a specified directory. The core file and the kernel file make up the core dump pair (for example, vmcore.N and vmunix.N where N is a number that associates a core dump pair). adb and strdb require that both members of a core dump pair be present. In addition, it is very important that these members match for adb and strdb to be effective. They must match because the kernel (vmunix.N) file contains information which is used by adb and strdb as a road map into the core (vmcore.N) file. In order to have system core dumps saved automatically during boot-up, the savecore function must be enabled in the system's /etc/rc.config file. Search this file for the string SAVECORE and follow the instructions in the comments. If savecore() was not run at boot-up, or did not succeed, you can still run savecore(1m) manually by taking the following steps:
savecore begins by reporting the date and time of the crash. Next, it looks in the specified directory for a file named bounds. The bounds file contains the next sequence number (N), which savecore will use to create a unique core file and kernel file. savecore will copy the core image from the primary swap device to a file named vmcore.N. Lastly, savecore copies /stand/vmunix to a file named vmunix.N to complete the core dump pair. If /stand/vmunix was not the kernel that was running when the crash occurred, savecore will exit quickly without printing any message and will not save the core file. Use the -d option to tell savecore what kernel was running at the time of the system crash:
If a core dump pair is incomplete or not saved after a panic, you can look to the savecore(1m) man page for help. A system hang is a situation in which the system seems to be up but does not respond to external user control. Should this happen to your system, you will want to obtain a core dump so that the cause for the hang can be analyzed. The method for obtaining a core dump of a kernel in this state is to use the Transfer of Control (TOC) mechanism. The TOC mechanism causes the machine to vector through a special address which will cause the machine to do a core dump. Most Series 700 and 800 machines have the capability to perform TOC but the methods for performing this task are machine-dependent:
It is best if the size of the vmcore.N file is equal to that of the machine's physical memory. Because the core file is an image of memory at the time of a crash, if its size is not equal to the machine's physical memory size, some information will be lost. However, it is still possible to get some information from a partial core dump. |
|