How to run wshang script to collect webservd runtime information

Sometimes, we need to collect more information to troubleshoot web server hung or other issues. We have a wshang script (version 3.1) available at My Oracle Support (MOS) site from KM Doc ID


1325651.1 - "Download Location For Wshang Script - Gather Debug
Data Script For Troubleshooting Oracle iPlanet Web Server or Oracle
iPlanet Web Proxy Server Hangs".


This shows an example of how to run it and upload it to Sun Support.


After you gunzip and  tar out the contents, you can run wshang.ksh, e.g.


vm40:/wlee/tools/SUN-GDD-webserver-wshang-solaris> ./wshang.ksh

 This script collects 3 snapshots of the following information
 at a 15 seconds interval against a web server process:
        pstack
        pfiles
        prstat -L -a (will try 'top' on pre-Solaris 8 systems)
        pflags
        pmap -x
        pldd
        netstat -an
 And collections 30 seconds of:
        truss -feald -vall -wall -rall

Data will be collected to the location /tmp/wshang by default.
Data location should have enough disk space for large core files.
Would you like to specify a different directory for data?
(y/n)
n


The following is a list of web server processes:

Solaris 8 or greater
Web Server 7.0/6.1 processes
    26890 webservd -d /wlee/7.0u5/admin-server/config -r /wlee/7.0u5 -t /tmp/ad
    26936 webservd -d /wlee/7.0u5/https-vm40.singapore.sun-DOT-com/config -r /wlee/
Web Server 6.0 processes
Proxy Server 4.0 processes
    29504 proxyd -r /wlee/4.0sp10 -d /wlee/4.0sp10/proxy-admserv/config -n prox


Enter the PID of the web server process to collect data on
(Note that the correct PID for child webservd/ns-httpd process will not be listed correctly here if you have MaxProcs > 1 in your magnus.conf):
26936


(NOTE - MAKE SURE you select the right pid, e.g. in this case above, 26890 is for the admin server instance and 26936 is for the right web instance we need to collect data.)



   PID TTY         TIME CMD
 26936 ?           1:03 webservd


Gathering data now...

Loop 1 for 15 seconds...

collecting pflags...
collecting pmap -x...
collecting pldd...
collecting prstat -L -a...
collecting pstack...
collecting pfiles...
collecting netstat...

Loop 2 for 15 seconds...

collecting pflags...
collecting pmap -x...
collecting pldd...
collecting prstat -L -a...
collecting pstack...
collecting pfiles...
collecting netstat...

Loop 3 for 15 seconds...

collecting pflags...
collecting pmap -x...
collecting pldd...
collecting prstat -L -a...
collecting pstack...
collecting pfiles...
collecting netstat...

collecting 30 seconds of truss...
done

Collecting gcore...
gcore: /tmp/wshang/gcore.out.26936 dumped
/wlee/7.0u5/lib/webservd
\* ----------------------------------------------------------------------------------
\* Sun Microsystems RSD pkgapp 3.0 Solaris                               [06/24/2009]
\* ----------------------------------------------------------------------------------
\* OS release                            [5.10]
\* Platform                              [SUNW,T5140]
\* Checking [-c] is a core or pid        [using pid 26936]
\* Process Root                          [/wlee/7.0u5/https-vm40.singapore.sun-DOT-com/config]
\* Databin parameter [-s] checks         [reset to /wlee/tools/SUN-GDD-webserver-wshang-solaris]
\* Creating Databin directories          [/tmp/wshang/pkgapp_data]
\* Databin used/created is               [/tmp/wshang/pkgapp_data/pkgapp-062409-01]
\* Creating temp area                    [/tmp/pkgapp.27886/]
\* Pid used, no corefile to check
\* Process binary                        [webservd]
\* Checking usage history                [not recently run]
\* webservd binary bit version           [32]
\* Checking path [-p] to binary name     [failed, path includes binary name]
\* Resetting path [-p] parameter         [/wlee/7.0u5/lib]
\* Checking path [-p] is a directory     [success]
\* Locating webservd                     [success]
\* Checking located webservd is 32 bit   [success]
\* Binary located                        [/wlee/7.0u5/lib/webservd]
\* Adding binary to pkgapp.pldd          [success]
\* Grabbing pldd                         [success]
\* Grabbing pstack                       [success]
\* Grabbing pmap                         [success]
\* Grabbing pcred                        [success]
\* Grabbing pflags                       [success]
\* Grabbing pargs                        [success]
\* Not Including the core/gcore
\* Javatools [-j] not set                [skipped]
\* Grabbing /var/adm/messages            [success]
\* Grabbing uname -a                     [success]
\* Grabbing date/time                    [success]
\* Grabbing showrev -p                   [success]
\* Grabbing pkginfo -l                   [success]
\* Grabbing /etc/release                 [success]
\* Grabbing coreadm                      [success]
\* Grabbing ulimit                       [success]
\* Grabbing libs                         [success]
\* Making lib paths app/                 [success]
\* Making lib paths libs/                [success]
\* Linking libraries                     [success]
\* Libraries linked                      [126 ttl]
\*
\* Using hostid for naming .tar.gz       [8446a6e0]
\* Writing file                          [pkgapp-8446a6e0-vm40-090624-140141.tar.gz]
\*
\* Done gathering files
\* Writing dbxrc & opencore.sh files     [success]
\* Writing manifest-090624-140141.log    [success]
\* Writing pkgapp-args-090624-140141     [success]
\* Creating final tarfile                [success]
\* Compressing tarfile                   [success]
\* End of runtime logging
\* Saving history info                   [/var/tmp/pkgapp-history/history-090624-140141.log]
\* Saving runtime log                    [/var/tmp/pkgapp-history/runtime-090624-140141.log]
\* Removing [-r] temp area/files         [left alone]
\*
\* Operations Complete
----------------------------------------------------------------------------------
Upload the following file(s) to your supportfiles.sun.com Cores Directory at Sun

1) File(s) located in directory /tmp/wshang/pkgapp_data/pkgapp-062409-01

                [ pkgapp-8446a6e0-vm40-090624-140141.tar.gz ]



                                Thank you.
                                Sun Software Technology Service Center (STSC)


NOTES:
1) You can check for updates to this script here:
        BigAdmin - http://www.sun.com/bigadmin/scripts/indexSjs.html
2) Release Notes and Guides located here:
        Docs - http://docs.sun.com/app/docs/doc/820-0437
3) GDD information located here:
        Docs - http://www.sun.com/service/gdd/index.xml

4) Please send all Bugs and RFE's to the following address:
        Subject "pkgapp bug/rfe" - gdd-issue-tracker-AT-sun.com

5) Please send all other questions etc to:
        Subject "pkgapp feedback" - gdd-feedback-AT-sun.com


Creating a tar file of the results...
a gcore.out.26936 234056K
a gcore_pldd.out 3K
a gcore_pmap.out 20K
a gcore_pstack.out 101K
a netstat.out.1 10K
a netstat.out.2 10K
a netstat.out.3 10K
a pfiles.out.1 4K
a pfiles.out.2 4K
a pfiles.out.3 4K
a pflags.out.1 15K
a pflags.out.2 15K
a pflags.out.3 15K
a pkgapp_data/ 0K
a pkgapp_data/pkgapp-062409-01/ 0K
a pkgapp_data/pkgapp-062409-01/pkgapp-8446a6e0-vm40-090624-140141.tar.gz 19834K
a pldd.out.1 3K
a pldd.out.2 3K
a pldd.out.3 3K
a pmap.out.1 26K
a pmap.out.2 26K
a pmap.out.3 26K
a prstat.out.1 2K
a prstat.out.2 2K
a prstat.out.3 2K
a pstack.out.1 101K
a pstack.out.2 101K
a pstack.out.3 101K
a release.out 1K
a showrev.out 62K
a truss.out 256K
a ulimit 1K
a uname.out 1K

The tar file has been created....

Please send the file /tmp/wshang/11111111-gdd-wshang-09062413H58M31S.tar.gz to
Sun Microsystems at https://supportfiles.sun.com/upload
Choose cores as the destination.

--------------------end wshang.ksh outputs above----------------


You can see the default case number = 11111111 above.


There are two ways to change it.


1. before you run the wshang.ksh script, you go in and change it, e.g.


vi +51 wshang.ksh


CASENUMBER=11111111


then change above to your case number before you run the wshang.ksh script.


Or,


2. You can rename the final  tar file to your SR case number, 7xxxxxxx, before you upload it to above, e.g.


from /tmp/wshang/11111111-gdd-wshang-09062413H58M31S.tar.gz


to /tmp/wshang/71234567-gdd-wshang-09062413H58M31S.tar.gz


before you upload to sun at 


https://supportfiles.sun.com/upload


Choose cores as the destination.


Then tell Sun Support what filename(s) you just uploaded.







Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Wing-Yip Walter Lee

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today