+

Search Tips   |   Advanced Search

Turning traces on and off in servers processes using scripting

Use scripting to turn traces on or off in server processes.

See the starting the wsadmin scripting client information.

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


Tasks

  1. 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,*')
      

  2. 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,*')
      

  3. Turn tracing on or off for the server.

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

  • Enable trace on a running server
  • Configure traces using scripting
  • Tracing operations
  • wsadmin AdminControl
  • Work with trace
  • Start the wsadmin scripting client
  • Commands for the AdminControl object