Sun Gathering Debug Data for Sun Java System Application Server

2.3.1 Running the appserver_8_hang.sh Debugging Script

The goal of the appserver_8_hang.sh script is to automate the collection of debug data if the Application Server gets into an unresponsive state when running on a Solaris system.

ProcedureTo Run the appserver_8_hang.sh Script

All data generated by the script is compiled under a single tar.gz file named APPSERVD_DATA_ddmmyyhhmmss.tar.gz, where ddmmyyhhmmss is the date and timestamp.

In addition to general debug data, this script gathers data three times on the specific instance (prstat -L -p, pflags, pstack, pmap, pldd, pfiles), separated by the time specified in the variable INTERVAL (see below).

  1. The following variables must be defined before running the script:

    DAS_OR_INSTANCE

    Either domain name, if gathering DAS instance information, or instance name, if gathering non-DAS instance information

    DAT_DIR

    Output directory where temporary and final data will be stored

    HOSTNAME

    Host name/IP of the interface on which the HTTP requests will be made when using the INTERVAL variable (see below)

    DAS_OR_INSTANCE_HTTP_PORT

    HTTP port on which the HTTP requests will be made (see below)

  2. Optionally, you can set the following at run time:

    INTERVAL

    Determines the interval between loops (see above); defaults to 10 seconds

    JAVA_5

    If the app server is running Java 5, choose “yes” to have the script run additional Java 5–specific commands (jps, jinfo, jmap, jstack)

    JAVA_HOME

    Required if JAVA_5=yes

    GCORE

    Determines whether a gcore of the Application Server process will be taken (GCORE="yes") or not (any other value); running the pkg_app.sh script on the generated core file is required if this variable is enabled

    JAVA_THREADS

    Determines whether kill -3 will be run on the Application Server process (to obtain Java thread dump)

    TRUSS

    Determines whether the Application Server process will be trussed for TRUSS_DURATION; defaults to 30 seconds

    HTTP_10_REQ

    Determines whether an HTTP 1.0 request will be made on the Application Server's HTTP interface (DAS_OR_INSTANCE_HTTP_PORT)

    HTTP_11_REQ

    Determines whether an HTTP 1.1 request will be made on the Application Server's HTTP interface (DAS_OR_INSTANCE_HTTP_PORT)

    HTTP_URI

    The URI used when running the HTTP requests (see above)