HAWQ packcore utility

Core file

A core file is a disk file that records the memory image of a running process in the event the process crashes or terminates abruptly. The information in this image is useful for debugging the state of a process at the time when it was terminated.

Packcore

The packcore utility helps pack a core file with its context, including the executable, application, and shared system libraries from the current environment. This information can be unpacked for later debugging on a different system. Packcore extracts the name of the binary that generated the core from the core file, then executes ldd (List Dynamic Dependencies) to create a single tar archive containing the core file information.

Using packcore

The packcore utility is located under ${GPHOME}/sbin. Run one of the following commands to pack a core file:

  1. $ $GPHOME/sbin/packcore <core_file>

or

  1. $ $GPHOME/sbin/packcore -b|--binary $GPHOME/bin/postgres <core_file>

Alternatively, you can navigate to $GPHOME/sbin and run the following:

  1. $ ./packcore <core_file>

or

  1. $ ./packcore -b|--binary $GPHOME/bin/postgres <core_file>

When processing is completed, the utility creates a tar file in the format: packcore-.tgz. Unpack this file on another system to use it for debugging.