snapcore Command

Purpose

Gathers the core file.

Syntax

snapcore[ -d Dir] [-r] core [program]

Description

The snapcore command gathers the core file, program, and libraries used by the program and compresses the information into a pax file. The file can then be downloaded to disk or tape, or transmitted to a remote system. The information gathered with the snapcore command is required to identify and resolve a problem with the application.

The snapcore command checks for available space in the /tmp/snapcore directory, the default directory for snapcore command output. You can write the output to another directory by using the -d flag. If there is not enough space to hold the snapcore command output, you must expand the file system.

Each execution of the snapcore command creates a new archive file. The archive file is named snapcore_$pid.pax. Use the -r flag to remove the previously created archive file. This command uses $pid (pid of the snapcore command) to create a unique name file and preserve any previously created archives.

Specify the full path name for core and program. If the program name is not specified, snapcore reads the program name from the core file and searches for the location in directories contained in the PATH variable.

Flags

Item Description
-dDir Identifies the optional snapcore command output directory (/tmp/snapcore is the default).
-r Removes snapcore command output from the /tmp/snapcore directory.

Examples

  1. To gather the core file, enter the following:
    1. snapcore <core file name> <program name>
    2. snapcore <core file name>
    Directories contained in the PATH variable are searched to find the program file. The pax file is created in /tmp/snapcore directory.
  2. To clean the previously created core archive and create a new one, enter the following:

    snapcore -r<core file name> <program name>

    The pax file is created in /tmp/snapcore directory.

  3. To create the core file archive in an alternate directory, enter the following:

    snapcore -d<dir name> <core file name> <program name>

    The pax file is created in <dirname>/tmp/snapcore directory.

  4. To clean the /tmp/snapcore directory, enter the following:

    snapcore -r

Files

Item Description
/usr/sbin/snapcore Contains the snapcore command.
/tmp/snapcore Contains core file archive.