WebSphere Application Server Network Deployment, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Configuring traces using scripting

Before you begin

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

Why and when to perform this task

Perform the following steps to set the trace for a configured server:

Steps for this task

  1. Identify the server and assign it to the server variable:
    • Using Jacl:

      set server [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]
    • Using Jython:
      server = AdminConfig.getid('/Cell:mycell/Node:mynode/Server:server1/')
      print server
    Example output:
    server1(cells/mycell/nodes/mynode/servers/server1|server.xml#Server_1)
  2. Identify the trace service belonging to the server and assign it to the tc variable:
    • Using Jacl:

      set tc [$AdminConfig list TraceService $server]
    • Using Jython:
      tc = AdminConfig.list('TraceService', server)
      print tc
    Example output:
    (cells/mycell/nodes/mynode/servers/server1|server.xml#TraceService_1)
  3. Set the trace string. The following example sets the trace string for a single component:
    • Using Jacl:

      $AdminConfig modify $tc {{startupTraceSpecification 
      com.ibm.websphere.management.*=all=enabled}}
    • Using Jython:
      AdminConfig.modify(tc, [['startupTraceSpecification',  
      'com.ibm.websphere.management.*=all=enabled']])
  4. The following command sets the trace string for multiple components:
    • Using Jacl:

      $AdminConfig modify $tc {{startupTraceSpecification 
      com.ibm.websphere.management.*=all=enabled:com.ibm.ws.
      management.*=all=enabled:com.ibm.ws.runtime.*=all=enabled}}
    • Using Jython:
      AdminConfig.modify(tc, [['startupTraceSpecification',  
      'com.ibm.websphere.management.*=all=enabled:com.ibm.ws.
      management.*=all=enabled:com.ibm.ws.runtime.*=all=enabled']])
  5. Save the configuration changes. See the Saving configuration changes with the wsadmin tool article for more information.
  6. In a network deployment environment only, synchronize the node. See the Synchronizing nodes with the wsadmin tool article for more information.



Related concepts
AdminControl object for scripted administration

Related reference
Commands for the AdminControl object

Task topic    

Terms of Use | Feedback

Last updated: Mar 17, 2005 4:28:29 AM CST
http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/txml_configtrace.html

© Copyright IBM Corporation 2004, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)