Turning traces on and off in servers processes using scripting

 

Procedure

  1. Start wsadmin

  2. Identify the object name for the TraceService MBean running in the process:

    • Jacl

      $AdminControl completeObjectName type=TraceService,node=mynode,process=server1,*
      

    • Jython

      AdminControl.completeObjectName('type=TraceService,node=mynode,process=server1,*')
      

  3. Obtain the name of the object and set it to a variable:

    • Jacl

      set ts [$AdminControl completeObjectName type=TraceService,process=server1,*]
      

    • Jython

      ts = AdminControl.completeObjectName('type=TraceService,process=server1,*')
      

  4. Turn tracing on or off for the server. For example:

    • To turn tracing on, perform the following step:

      • Jacl

        $AdminControl setAttribute $ts traceSpecification com.ibm.*=all=enabled
        

      • Jython

        AdminControl.setAttribute(ts, 'traceSpecification', 'com.ibm.*=all=enabled')
        

    • To turn tracing off, perform the following step:

      • Jacl

        $AdminControl setAttribute $ts traceSpecification com.ibm.*=all=disabled
        

      • Jython

        AdminControl.setAttribute(ts, 'traceSpecification', 'com.ibm.*=all=disabled')
        


 

See Also


AdminControl object for scripted administration
Enabling tracing and logging

 

See Also


Commands for the AdminControl object