Disabling the trace service using scripting

You can disable the services of a configured server with scripting and the wsadmin tool.

About this task

Perform the following steps to disable the trace service of a configured server. You can modify this example to disable a different service.

Procedure

  1. Inicie a ferramenta de script wsadmin.
  2. Identify the server and assign it to the server variable. For example:
    • 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)
  3. List all the services belonging to the server and assign them to the services variable. The following example returns a list of services:
    • Using Jacl:

      set services [$AdminConfig list Service $server]
    • Using Jython:

      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)
  4. Identify the trace service and assign it to the traceService variable.

    Since trace service is the seventh element in the list, retrieve this element by using index 6.

    • Using Jacl:

      set traceService [$AdminConfig list TraceService $server]
    • Using Jython:

      traceService = AdminConfig.list('TraceService', server)
      print traceService
    Example output:
    (cells/mycell/nodes/mynode/servers/server1|server.xml#TraceService_1)
  5. Disable the trace service by modifying the enable attribute. For example:
    • Using Jacl:

      $AdminConfig modify $traceService {{enable false}}
    • Using Jython:

      AdminConfig.modify(traceService, [['enable', 'false']])
  6. Save the configuration changes.
    Utilize o seguinte exemplo de comando para salvar suas alterações de configuração:
    AdminConfig.save()
  7. In a network deployment environment only, synchronize the node.
    Utilize os scripts syncActiveNode ou syncNode na biblioteca de scripts AdminNodeManagement para propagar as alterações de configuração para o(s) nó(s).
    • Utilize o script syncActiveNodes para propagar as alterações para cada nó na célula, conforme demonstra o seguinte exemplo:
      AdminNodeManagement.syncActiveNodes()
    • Utilize o script syncNode para propagar as alterações para um nó específico, conforme demonstra o seguinte exemplo:
      AdminNodeManagement.syncNode("myNode")

Ícone que indica o tipo de tópico Tópico de Tarefa



Ícone de registro de data e hora Última atualização: July 9, 2016 7:58
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_disableservice
Nome do arquivo: txml_disableservice.html