This script packages an executable and all of its shared libraries into one compressed tar file, and named corresponding to the PID of the application and optionally the name of the core file to be opened. The files are stripped of their directory paths and are stored under a relative directory named app/ with their name only, allowing them to be unpacked in one directory.
On Solaris 9 OS or later, if the core file is specified, the list of files is derived from the core file rather than from the process image. You still must provide the PID of the running application to assist in path resolution.
Two scripts are created to facilitate opening the core file when the tar file is unpacked:
opencore – The script to be executed once unpacked; it sets the name of the core file and the linker path to use the app/ subdirectory and then invokes dbx with the dbxrc file as the argument.
dbxrc – Contains the dbx initialization commands to open the core file.
The pkg_app script asks for your Sun Case Number to name the tar.gz file.
Copy the script to a temporary directory on the system where Application Server is installed.
Execute the pkg_app script in one of the following three ways:
./pkg_app application-pid corefile
./pkg_app application-pid(The pkg_app scripts prompts for the corefile name.)
./pkg_app core file