Turning traces on and off in servers processes using scripting

You can use scripting to turn traces on or off in server processes.

Before you begin

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

About this task

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

Procedure

  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')



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms of Use | Feedback

Last updatedLast updated: Sep 19, 2011 6:15:55 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-express-dist&topic=txml_aosupport
File name: txml_aosupport.html