Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.
Perform the following steps to disable the trace service of a configured server. You can modify this example to disable a different service.
set server [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]
server = AdminConfig.getid('/Cell:mycell/Node:mynode/Server:server1/') print server
Example output:
server1(cells/mycell/nodes/mynode/servers/server1|server.xml#Server_1)
set services [$AdminConfig list Service $server]
services = AdminConfig.list('Service', server) print services
Example output:
(cells/mycell/nodes/mynode/servers/server1|server.xml#AdminService_1) (cells/mycell/nodes/mynode/servers/server1|server.xml#DynamicCache_1) (cells/mycell/nodes/mynode/servers/server1|server.xml#MessageListenerService_1) (cells/mycell/nodes/mynode/servers/server1|server.xml#ObjectRequestBroker_1) (cells/mycell/nodes/mynode/servers/server1|server.xml#PMIService_1) (cells/mycell/nodes/mynode/servers/server1|server.xml#RASLoggingService_1) (cells/mycell/nodes/mynode/servers/server1|server.xml#SessionManager_1) (cells/mycell/nodes/mynode/servers/server1|server.xml#TraceService_1) (cells/mycell/nodes/mynode/servers/server1|server.xml#TransactionService_1)
Since trace service is the 7th element in the list, retrieve this element by using index 6.
set traceService [$AdminConfig list TraceService $server]
traceService = AdminConfig.list('TraceService', server) print traceService
Example output:
(cells/mycell/nodes/mynode/servers/server1|server.xml#TraceService_1)
$AdminConfig modify $traceService {{enable false}}
AdminConfig.modify(traceService, [['enable', 'false']])
Related concepts
AdminConfig object for scripted administration
Related reference
Commands for the AdminConfig object