+

Search Tips   |   Advanced Search

Turning traces on and off in servers processes

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

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

To turn traces on and off in server processes:

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


Related tasks

  • Enable trace on a running server
  • Configure traces
  • Tracing operations using wsdmin.sh
  • Use the wsadmin scripting AdminControl object for scripted administration
  • Work with trace
  • Start the wsadmin scripting client

  • Commands for the AdminControl object