Description
The following steps should be taken when a NetBackup process or daemon has generated a core file on a HP-UX system. This will help ensure the relevant information is collected for when the core file needs to be analyzed as part of a support escalation.
For the basic supporting information that should be gathered whenever a core file is generated see the article found below in the Related Articles section.
The following HP-UX commands are available for analyzing a core file. These steps require that both the core file and the binary that generated it. It is best to run these commands on the system where the core file was originally generated.
- To find the binary that created the core file run the file command.
# cd/<location_of_core_file>
#file core
core: corefile from 'vxpbxcfg' - received SIGABRT
- Start the debugger.
- To start the command line gdbrun:
#/opt/langtools/bin/gdb <binary> <core> 2>&1 | tee/tmp/gdb.txt
Where <binary> is the location of the binary that produced the core file.
Where <core> is the location of the core file.
- Use the graphical wdbcommand tool, that can be downloaded from https://www.hp.com/go/wdb/
#/opt/langtools/bin/wdb
Select File > Load Program to select the binary and core file to analyse. (Figure 1)
For the Executable Name:enter the path to the binary that generated the core file.
Place a check in the box before Core File and enter the path to the core file.
Click OK to load the files.
Figure 1 - Load Program dialog
- To start the command line gdbrun:
- At the (gdb) prompt gather some information regarding the core file.
(gdb)bt
(gdb)info threads
(gdb)thread apply all where
(gdb)info stack
(gdb)info registers
(gdb)info target
(gdb)quit
- Gather the /tmp/gdb.txt (if gdb was started from the command line) or cut and paste the results from wdb and save them to a text file. This output should be included in any open support case for the issue.
Enabling unique core file naming
If multiple core files are generated the core file will be overwritten by the last entry. HP-UX has a kernel parameter that can be used to enable unique naming of core files. This information can be found on the HP Web site at:
https://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=2108725cc2f02110725cc2f02110275d6e10RCRD
# echo'core_addpid/W 1' | adb -k -w /stand/vmunix /dev/kmem
# echo 'core_addpid/W 1' | adb -o-w /stand/vmunix /dev/kmem
The coreadm command has been added to HP-UX which can be used to enable unique core file names. For more information visit the HP Web site at: https://docs.hp.com/en/B2355-60130/coreadm.1M.html