Example: Configuring a trace using wsadmin
The following example sets the trace for a configured server:
- Identify the server and assign it to the server variable:
set server [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]Example output:
server1(cells/mycell/nodes/mynode/servers/server1:server.xml#Server_1)- Identify the trace service belonging to the server and assign it to the tc variable:
set tc [$AdminConfig list TraceService $server]Example output:
(cells/mycell/nodes/mynode/servers/server1:server.xml#TraceService_1)- Set the trace string.
The following example sets the trace string for a single component:
$AdminConfig modify $tc {{startupTraceSpecification com.ibm.websphere.management.*=all=enabled}}The following command sets the trace string for multiple components:
$AdminConfig modify $tc {{startupTraceSpecification com.ibm.websphere.management.*=all=enabled:com.ibm.ws.management.*=all=enabled:com.ibm.ws.runtime.*=all=enabled}}- Save the changes with the following command:
$AdminConfig saveLast updated: Aug 27, 2003 3:29:29 PM EDT