|
| Problem | Dump the trace ring buffer without going through the Admininstrative Console | | | | Solution | Create a shell script and copy the following code into it. #!/usr/bin/ksh # #------------------------------------------------------------ # This script is used to dump the Ring Buffer without going # through the admin console. It assumes that the trace has # already been enabled and the trace parameters set through # the admin console. # (i.e. com.ibm.ejs.security.*=all) # # This script can be useful when called from another script # which is monitoring the tracefile for a specific exception, # when the exception occurs this script can be called to dump # the Ring Buffer automatically. # # NOTE: The DrAdmin.sh script must be created as discribed in # the infocenter # www.ibm.com/software/webservers/appserv/doc/v35/ae/infocenter # Section: 8.4.1 TraceSamples #------------------------------------------------------------
WAS_Root=/usr/WebSphere/AppServer TrcFile=${WAS_Root}/logs/tracefile DumpFileName=${WAS_Root}/logs/RingBuffer.dump SearchStg="DrAdmin available on port" Server=localhost
cd ${WAS_Root}/bin/debug
#------------------------------------------------------------ # The DrAdmin process lists which port it is listening # on in the tracefile at bootup. # This gets the last registered port from the tracefile # and assigns it to the variable ${PORT}. #------------------------------------------------------------
for i in `grep "${SearchStg}" ${TrcFile} | awk '{print $12}' | awk 'BEGIN {FS=","}{print $1 $2}'` do PORT=$i done
${WAS_Root}/bin/debug/DrAdmin.sh -dumpRingBuffer ${DumpFileName} -serverHost ${Server} -serverPort ${PORT} | |
| |
| |
|
Product categories: Software, Application Servers, Distributed Application & Web Servers, WebSphere Application Server, System Management/Repository Operating system(s): AIX, HPUX, Linux, Solaris Software version: 3.5, 4.0 Software edition: Standard, Advanced Reference #: 1023798 IBM Group: Software Group Modified date: 2003-11-26
(C) Copyright IBM Corporation 2000, 2004. All Rights Reserved.
|