Sun Gathering Debug Data for Sun Java System Messaging Server

1.7 Running the Messaging Server Debugging Scripts

This section describes how to run the dbhang and pkg_app scripts.

Note –

The dbhang command (version 3) now uses pkginfo to find the server-root directory and from that gathers other necessary information from configutil, thereby avoiding the need to edit the script. You can still use command-line switches to override these defaults. A side-effect of this enhancement is that the new version works only on Messaging Server 6.0 and later releases. If you are running iPlanet Messaging Server 5.2, continue to use dbhang version 2.10.

ProcedureTo Run the dbhang Script

The dbhang script gathers data about problems where the Message Store database is the source of the hang. The dbhang script is not intended to be an all-purpose data gathering script for Messaging Server.

  1. Customize the dbhang script to reflect the specificities of your Messaging Server installation. Use an editor to modify the script then change the SRVROOT, INST, and MAILUSER variables in the top part of the script.

  2. Using the configutil command, check if the store.dbtmpdir parameter is set. If it is set, change DBTMPDIR to the same value as store.dbtmpdir, otherwise it should be $MBOXLIST.

  3. Leave the following variables set to their default values unless otherwise instructed by Sun Support:


    You should not need to change anything below this comment:

    # you should not need to edit anything below here

    Note –

    Occasionally, the dbhang script cannot find the log files in their expected location, so you might need to change this as well.

  4. Perform a test run of the dbhang script after you have made your edits. Ensure that the script runs without errors.

  5. Execute the dbhang script and collect the data when you have a problem.

ProcedureTo Run the pkg_app Script

This script packages an executable and all of its shared libraries into one compressed tar file given 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 greater, the list of files is derived from the core file rather than the process image if it is specified. 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:

  1. Copy the script to a temporary directory on the system where Portal Server is installed.

  2. Become superuser.

  3. Execute the pkg_app script in one of the following three ways:

    • ./pkg_app pid-of-running-application corefile

    • ./pkg_app pid-of-the-running-application(The pkg_app scripts prompts for the corefile name.)

    • ./pkg_app core file