![[AIX Solaris HP-UX Linux Windows]](../images/dist.gif)
![[z/OS]](../images/ngzos.gif)
智慧型管理:Web 伺服器管理作業
「智慧型管理」功能適用於受管理和未受管理節點中的 Apache 或 IBM HTTP 伺服器。您可以使用指令行,來執行「智慧型管理」的管理作業。
GenPluginCfg 指令會從指令行介面產生外掛程式。如果您執行這個指令,只要有啟用「智慧型管理」功能,就會包含這些功能。如果想進一步瞭解「智慧型管理」功能,請閱讀有關配置 Web 伺服器的「智慧型管理」的說明。
從 wsadmin 命令提示字元執行下列指令:
指令清單
- addRemoteCellToIntelligentManagement
- addConditionalTraceRuleForIntelligentManagement
- removeConditionalTraceRuleForIntelligentManagement
- setDefaultTraceRuleForIntelligentManagement
- listTraceRulesForIntelligentManagement
- addPluginPropertyForIntelligentManagement
- removePluginPropertyForIntelligentManagement
- deleteRemoteCellFromIntelligentManagement
- disableIntelligentManagement
- enableIntelligentManagement
- listRemoteCellsFromIntelligentManagement
- modifyIntelligentManagement
- modifyIntelligentManagementConnectorCluster
- refreshCellForIntelligentManagement
addRemoteCellToIntelligentManagement
addRemoteCellToIntelligentManagement 指令會將遠端 Cell 連接器新增至「智慧型管理」。
必要參數
選用參數
批次模式用法範例
- 使用 Jacl:
$AdminTask addRemoteCellToIntelligentManagement {-node unmanagednode1 -webserver ws1 -host test1.ibm.com -port 8879 -userid janedoe -password pw1234 -importCertificates true} (cells/testCell08/nodes/unmanagednode1/servers/ws1|intellmgmt.xml #IntelligentManagement_1350344826526)
- 使用 Jython 字串:
AdminTask.addRemoteCellToIntelligentManagement(['-node', 'unmanagednode1', '-webserver', 'ws1', '-host', 'test1.ibm.com', '-port', '8879', '-userid', 'janedoe', '-password', 'pw1234', '-importCertificates', 'true']) '(cells/testCell08/nodes/unmanagednode1/servers/ws1|intellmgmt.xml #IntelligentManagement_1350344826526)'
互動模式用法範例
- 使用 Jacl:
$AdminTask addRemoteCellToIntelligentManagement {-interactive}
- 使用 Jython 字串:
AdminTask.addRemoteCellToIntelligentManagement ('[-interactive]')
addConditionalTraceRuleForIntelligentManagement
addConditionalTraceRuleForIntelligentManagement 指令會新增「智慧型管理」的條件式追蹤規則。
必要參數
- -node
- 指定 Web 伺服器節點名稱。(字串,必要)
- -webserver
- 指定 Web 伺服器名稱。(字串,必要)
選用參數
批次模式用法範例
- 使用 Jacl:
wsadmin>$AdminTask addConditionalTraceRuleForIntelligentManagement { -node unmanagednode1 -webserver ws1 -spec "http.request:DEBUG" -condition "port=1" }
- 使用 Jython 字串:
AdminTask.addConditionalTraceRuleForIntelligentManagement(['-node', 'unmanagednode1', '-webserver', 'ws1', '-spec', 'http.request:DEBUG', '-condition', 'port=1'])
互動模式用法範例
- 使用 Jacl:
$AdminTask addConditionalTraceRuleForIntelligentManagement {-interactive}
- 使用 Jython 字串:
AdminTask.addConditionalTraceRuleForIntelligentManagement ('[-interactive]')
removeConditionalTraceRuleForIntelligentManagement
removeConditionalTraceRuleForIntelligentManagement 指令會移除「智慧型管理」的條件式追蹤規則。
必要參數
- -node
- 指定 Web 伺服器節點名稱。(字串,必要)
- -webserver
- 指定 Web 伺服器名稱。(字串,必要)
選用參數
無。
批次模式用法範例
- 使用 Jacl:
wsadmin>$AdminTask removeConditionalTraceRuleForIntelligentManagement { -node unmanagednode1 -webserver ws1 }
- 使用 Jython 字串:
AdminTask.removeConditionalTraceRuleForIntelligentManagement(['-node', 'unmanagednode1', '-webserver', 'ws1'])
互動模式用法範例
- 使用 Jacl:
$AdminTask removeConditionalTraceRuleForIntelligentManagement {-interactive}
- 使用 Jython 字串:
AdminTask.removeConditionalTraceRuleForIntelligentManagement ('[-interactive]')
setDefaultTraceRuleForIntelligentManagement
setDefaultTraceRuleForIntelligentManagement 指令會為「智慧型管理」追蹤規格設定預設追蹤規則。
必要參數
- -node
- 指定 Web 伺服器節點名稱。(字串,必要)
- -webserver
- 指定 Web 伺服器名稱。(字串,必要)
選用參數
- -spec
- 指出追蹤規格。對於每一個規格參數,您可以選擇下列其中一個追蹤層次:
- emerg
- alert
- critical
- error
- warning
- notice
- info
- debug
- off
批次模式用法範例
- 使用 Jacl:
wsadmin>$AdminTask setDefaultTraceRuleForIntelligentManagement { -node unmanagednode1 -webserver ws1 -spec "control.mapper:ERROR" }
- 使用 Jython 字串:
AdminTask.setDefaultTraceRuleForIntelligentManagement(['-node', 'unmanagednode1', '-webserver', 'ws1', '-spec', 'control.mapper:ERROR']) '(cells/testCell08/nodes/unmanagednode1/servers/ws1|intellmgmt.xml #IntelligentManagement_1350344826526)'
互動模式用法範例
- 使用 Jacl:
$AdminTask setDefaultTraceRuleForIntelligentManagement {-interactive}
- 使用 Jython 字串:
AdminTask.setDefaultTraceRuleForIntelligentManagement ('[-interactive]')
listTraceRulesForIntelligentManagement
listTraceRulesForIntelligentManagement 指令會列出「智慧型管理」追蹤規則。
必要參數
- -node
- 指定 Web 伺服器節點名稱。(字串,必要)
- -webserver
- 指定 Web 伺服器名稱。(字串,必要)
選用參數
無。
批次模式用法範例
- 使用 Jacl:
wsadmin>$AdminTask listTraceRulesForIntelligentManagement { -node unmanagednode1 -webserver ws1 } "default control.mapper:ERROR true" "1 http.request:DEBUG port=1"
- 使用 Jython 字串:
AdminTask.listTraceRulesForIntelligentManagement(['-node', 'unmanagednode1', '-webserver', 'ws1'])
互動模式用法範例
- 使用 Jacl:
$AdminTask listTraceRulesForIntelligentManagement {-interactive}
- 使用 Jython 字串:
AdminTask.listTraceRulesForIntelligentManagement ('[-interactive]')
addPluginPropertyForIntelligentManagement
addPluginPropertyForIntelligentManagement 指令會將 <Property> 子元素新增至 plugin-cfg.xml 檔中的 <IntelligentManagement> 元素。 plugin-cfg.xml 檔中的格式是:<Property name=inputname value=inputvalue/>
必要參數
選用參數
無。
批次模式用法範例
- 使用 Jacl:
$AdminTask addPluginPropertyForIntelligentManagement {-node node1 -webserver ws1 -name INPUTNAME -value inputvalue}
- 使用 Jython 字串:
AdminTask.addPluginPropertyForIntelligentManagement(['-node', 'node1', '-webserver', 'ws1', '-name INPUTNAME', '-value', 'inputvalue'])
互動模式用法範例
- 使用 Jacl:
$AdminTask addPluginPropertyForIntelligentManagement {-interactive}
- 使用 Jython 字串:
AdminTask.addPluginPropertyForIntelligentManagement ('[-interactive]')
removePluginPropertyForIntelligentManagement
removePluginPropertyForIntelligentManagement 指令會將 <Property> 子元素從 plugin-cfg.xml 檔中的 <IntelligentManagement> 元素移除。
必要參數
- -node
- 指定 Web 伺服器節點名稱。(字串,必要)
- -webserver
- 指定 Web 伺服器名稱。(字串,必要)
- -name
- 指出「智慧型管理」的 Web 伺服器自訂外掛程式內容名稱。(字串,必要)
選用參數
無。
批次模式用法範例
- 使用 Jacl:
$AdminTask removePluginPropertyForIntelligentManagement {-node node1 -webserver ws1 -name INPUTNAME}
- 使用 Jython 字串:
AdminTask.removePluginPropertyForIntelligentManagement(['-node', 'node1', '-webserver', 'ws1', '-name INPUTNAME'])
互動模式用法範例
- 使用 Jacl:
$AdminTask removePluginPropertyForIntelligentManagement {-interactive}
- 使用 Jython 字串:
AdminTask.removePluginPropertyForIntelligentManagement ('[-interactive]')
deleteRemoteCellFromIntelligentManagement
deleteRemoteCellFromIntelligentManagement 指令會將遠端 Cell 從「智慧型管理」中移除。
必要參數
- -node
- 指定 Web 伺服器節點名稱。(字串,必要)
- -webserver
- 指定 Web 伺服器名稱。(字串,必要)
- -host
- 遠端 Cell 的主機名稱。(字串,必要)
- -port
- 遠端 Cell 的埠。(整數,必要)
選用參數
無。
批次模式用法範例
- 使用 Jacl:
$AdminTask deleteRemoteCellFromIntelligentManagement {-node unmanagednode1 -webserver ws1 -host test1.ibm.com -port 8879 -deleteCertificates true} (cells/testCell08/nodes/unmanagednode1/servers/ws1|intellmgmt.xml #IntelligentManagement_1350344826526)
- 使用 Jython 字串:
AdminTask.deleteRemoteCellFromIntelligentManagement(['-node', 'unmanagednode1', '-webserver', 'ws1', '-host', 'test1.ibm.com', '-port', '8879', '-deleteCertificates', 'true']) '(cells/testCell08/nodes/unmanagednode1/servers/ws1|intellmgmt.xml #IntelligentManagement_1350344826526)'
互動模式用法範例
- 使用 Jacl:
$AdminTask deleteRemoteCellFromIntelligentManagement {-interactive}
- 使用 Jython 字串:
AdminTask.deleteRemoteCellFromIntelligentManagement ('[-interactive]')
disableIntelligentManagement
disableIntelligentManagement 會停用您 Web 伺服器上的「智慧型管理」。
必要參數
- -node
- 指定 Web 伺服器節點名稱。(字串,必要)
- -webserver
- 指定 Web 伺服器名稱。(字串,必要)
選用參數
無。
批次模式用法範例
- 使用 Jacl:
$AdminTask disableIntelligentManagement {-node unmanagednode1 -webserver ws1} (cells/testCell08/nodes/unmanagednode1/servers/ws1|intellmgmt.xml #IntelligentManagement_1350344826526)
- 使用 Jython 字串:
AdminTask.disableIntelligentManagement(['-node', 'unmanagednode1', '-webserver', 'ws1']) '(cells/testCell08/nodes/unmanagednode1/servers/ws1|intellmgmt.xml #IntelligentManagement_1350344826526)'
互動模式用法範例
- 使用 Jacl:
$AdminTask disableIntelligentManagement {-interactive}
- 使用 Jython 字串:
AdminTask.disableIntelligentManagement ('[-interactive]')
enableIntelligentManagement
enableIntelligentManagement 指令會啟用「智慧型管理」。
必要參數
- -node
- 指定 Web 伺服器節點名稱。(字串,必要)
- -webserver
- 指定 Web 伺服器名稱。(字串,必要)
選用參數
批次模式用法範例
- 使用 Jacl:
$AdminTask enableIntelligentManagement {-node unmangednode1 -webserver ws1 -retryInterval 120 -maxRetries "-1"} (cells/testCell08/nodes/unmanagednode1/servers/ws1|intellmgmt.xml #IntelligentManagement_1350344826526)
- 使用 Jython 字串:
AdminTask.enableIntelligentManagement(['-node', 'unmanagednode1', '-webserver', 'ws1', '-retryInterval', '120', '-maxRetries', '-1']) '(cells/testCell08/nodes/unmanagednode1/servers/ws1|intellmgmt.xml #IntelligentManagement_1350344826526)'
互動模式用法範例
- 使用 Jacl:
$AdminTask enableIntelligentManagement {-interactive}
- 使用 Jython 字串:
AdminTask.enableIntelligentManagement ('[-interactive]')
listRemoteCellsFromIntelligentManagement
listRemoteCellsFromIntelligentManagement 指令會列出遠端 Cell。
必要參數
- -node
- 指定 Web 伺服器節點名稱。(字串,必要)
- -webserver
- 指定 Web 伺服器名稱。(字串,必要)
選用參數
無。
批次模式用法範例
- 使用 Jacl:
wsadmin>$AdminTask listRemoteCellsFromIntelligentManagement { -node unmanagednode1 -webserver ws1 } "testell07 test1.ibm.com:8879" wsadmin>
- 使用 Jython 字串:
wsadmin>AdminTask.listRemoteCellsFromIntelligentManagement(['-node', 'unmanagednode1', '-webserver', 'ws1']) 'testCell07 test1.ibm.com:8879' wsadmin>
互動模式用法範例
- 使用 Jacl:
$AdminTask listRemoteCellsFromIntelligentManagement {-interactive}
- 使用 Jython 字串:
AdminTask.listRemoteCellsFromIntelligentManagement ('[-interactive]')
modifyIntelligentManagement
modifyIntelligentManagement 指令會修改「智慧型管理」內容。
必要參數
- -node
- 指定 Web 伺服器節點名稱。(字串,必要)
- -webserver
- 指定 Web 伺服器名稱。(字串,必要)
選用參數
- -cellIdentifier
- 指定唯一的 Cell ID。
- -retryInterval
- 指定重試啟用「智慧型管理」服務的間隔時間(秒)。
- -maxRetries
- 指定重試啟用「智慧型管理」服務的次數上限。
- -enableRoutingToAdminConsole
- 啟用遞送至連接器群組所代表之 WebSphere Cell 的管理主控台。
批次模式用法範例
- 使用 Jacl:
$AdminTask modifyIntelligentManagement {-node unmanagednode1 -webserver ws1 -retryInterval 90} (cells/testCell08/nodes/unmanagednode1/servers/ws1|intellmgmt.xml #IntelligentManagement_1350344826526)
- 使用 Jython 字串:
AdminTask.modifyIntelligentManagement(['-node', 'unmanagednode1', '-webserver', 'ws1', '-retryInterval', '90']) '(cells/testCell08/nodes/unmanagednode1/servers/ws1|intellmgmt.xml #IntelligentManagement_1350344826526)'
互動模式用法範例
- 使用 Jacl:
$AdminTask modifyIntelligentManagement {-interactive}
- 使用 Jython 字串:
AdminTask.modifyIntelligentManagement ('[-interactive]')
modifyIntelligentManagementConnectorCluster
modifyIntelligentManagementConnectorCluster 指令會修改 智慧型管理 的連接器叢集內容。
必要參數
- -node
- 指定 Web 伺服器節點名稱。(字串,必要)
- -webserver
- 指定 Web 伺服器名稱。(字串,必要)
選用參數
- -host
連接器叢集 Cell 的主機名稱。
- -port
連接器叢集 Cell 的埠。
- -cellidentifier
指定唯一的 Cell ID。
- -enable
啟用連接器叢集 Cell 的「智慧型管理」。預設值為 true。
- -retryInterval
- 指定重試啟用「智慧型管理」服務的間隔時間(秒)。
- -maxRetries
- 指定重試啟用「智慧型管理」服務的次數上限。
- -enableRoutingToAdminConsole
啟用遞送至連接器群組所代表之 WebSphere Cell 的管理主控台。
refreshCellForIntelligentManagement
refreshCellForIntelligentManagement 指令會重新整理「智慧型管理」的 Cell 連接器。本端和遠端 Cell 都可以重新整理。
必要參數
- -node
- 指定 Web 伺服器節點名稱。(字串,必要)
- -webserver
- 指定 Web 伺服器名稱。(字串,必要)
選用參數
- -local
- 指定 Cell 是否為本端。值是 true 或 false
- -host
- 遠端 Cell 的主機名稱。(字串,必要)
- -port
- 遠端 Cell 的埠。(整數,必要)
- -userid
- 遠端 Cell 的使用者 ID。只有在啟用安全時才需要。
- -password
- 遠端 Cell 的密碼。只有在啟用安全時才需要。
批次模式用法範例
- 使用 Jacl:
$AdminTask refreshCellForIntelligentManagement {-node unmanagednode1 -webserver ws1 -local false -host test1.ibm.com -port 8879 -userid janedoe -password pw1234}
- 使用 Jython 字串:
AdminTask.refreshCellForIntelligentManagement(['-node', 'unmanagednode1', '-webserver', 'ws1 ', '-local', 'false', '-host', 'test1.ibm.com', '-port', '8879', '-userid', 'janedoe', '-password', 'pw1234']) '(cells/testCell08/nodes/unmanagednode1/servers/ws1|intellmgmt.xml #IntelligentManagement_1350344826526)'
互動模式用法範例
- 使用 Jacl:
$AdminTask refreshCellForIntelligentManagement {-interactive}
- 使用 Jython 字串:
AdminTask.refreshCellForIntelligentManagement ('[-interactive]')