Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Troubleshoot with scripting


Turning traces on and off in servers processes using scripting

We can 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:


Procedure

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


Enable trace on a running server
Configure traces using scripting
Trace operations using wsadmin.sh
Use the wsadmin scripting AdminControl object for scripted administration
Work with trace


Related


Commands for the AdminControl object using wsadmin.sh
Trace and logging configuration

+

Search Tips   |   Advanced Search