WebSphere Application Server - Express, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Turning traces on and off in servers processes using scripting

Before you begin

Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

Why and when to perform this task

Perform the following steps to turning traces on and off in server processes:

Steps for this task

  1. Identify the object name for the TraceService MBean running in the process:
    • Using Jacl:
      $AdminControl completeObjectName type=TraceService,node=mynode,process=server1,*
    • Using Jython:
      AdminControl.completeObjectName('type=TraceService,node=mynode,process=server1,*')
  2. Obtain the name of the object and set it to a variable:
    • Using Jacl:
      set ts [$AdminControl completeObjectName type=TraceService,process=server1,*]
    • Using Jython:
      ts = AdminControl.completeObjectName('type=TraceService,process=server1,*')
  3. Turn tracing on or off for the server. For example:
    • To turn tracing on, perform the following step:
      • Using Jacl:
        $AdminControl setAttribute $ts traceSpecification com.ibm.*=all=enabled
      • Using Jython:
        AdminControl.setAttribute(ts, 'traceSpecification', 'com.ibm.*=all=enabled')
    • To turn tracing off, perform the following step:
      • Using Jacl:
        $AdminControl setAttribute $ts traceSpecification com.ibm.*=all=disabled
      • Using Jython:
        AdminControl.setAttribute(ts, 'traceSpecification', 'com.ibm.*=all=disabled')



Related concepts
AdminControl object for scripted administration
Enabling tracing and logging

Related reference
Commands for the AdminControl object

Task topic    

Terms of Use | Feedback

Last updated: Jun 8, 2005 12:45:23 PM EDT
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/txml_aosupport.html

© Copyright IBM Corporation 2004, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)