Sun Gathering Debug Data for Sun Java System Web Server

1.7 Running the Web Server Debugging Scripts

This section describes how to run the pkg_app, webinfo, and wshang scripts.

Note –

The webinfo script is currently applicable to only Web Server 6.0.

ProcedureTo Run the webinfo Script

There may be commands within the webinfoscript that you can run manually.

Note –

You can download a new version of the script at the following URL:

To run the webinfo script , perform the following steps:

  1. Move to a temporary directory.

  2. Change the following environment variable at the beginning of the file,



    TMPDIR= /tmp

  3. Make sure that you have a space between the parameter TMPDIR= and the value that you entered.

  4. Run the script.

    This creates the $TMPDIR/ directory and a tar file of that directory $TMPDIR/

    Note –

    Run this script as the Web Server user rather than root.

  5. Send the tar file to The Sun Support Center.

    Clean up $TMPDIR, if necessary.

    For error information which is related to your problem, see the Administrator or Web Server errors and access files.

ProcedureTo Run the wshang Script

  1. The wshang script collects three snapshots of the following information at 15 seconds interval against the hung instance:



    prstat -L -a


    pmap —x


    Note –

    You can modify the time interval by editing the script and changing the variable DURATION

  2. Run the wshang script. It shows a list of Web Server Process.

  3. Choose the process that has the problem.

ProcedureTo Run the pkg_app Script

This script packages an executable and all of its shared libraries into one tar file. Optionally, you can provide the PID of the application and the name of the core file.The files are stripped of their directory paths and are stored under a relative directory named app/ allowing them to be unpacked in one directory.

On Solaris 9 or higher version, the list of files is derived from the core file rather than the process image if the core file is specified . You 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 Web Server is installed.

  2. Login as superuser.

  3. Execute the pkg_app script.

    ./pkg_app.ksh -c [pid-of-application or corefile] -p <full path to process binary of webservd>