Sun Gathering Debug Data for Sun Java System Portal Server

1.7 Running the Portal Server Debugging Scripts

This section describes how to run the psinfo.sh and pkg_app scripts.

ProcedureTo Run the psinfo.sh Script

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

  2. Become superuser.

  3. Make sure that you have executable permission on the script.

  4. Run the script.

  5. Collect the result.

ProcedureTo Run the iwshang Script

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


    pstack
    pfiles
    prstat -L -a
    pflags
    pmap -x
    pldd

    Note –

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


  2. Run the iwshang 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 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