웹서버/OHS

[명령어] opmnctl 설명

투칼론 2017. 9. 19. 21:40
반응형

1. 개요


opmnctl은 오라클 웹티어 인스턴스를 기동하고, 종료할 수 있는 CLI 기반의 관리 및 모니터링할 수 있는 명령어이다. opmnctl 명령어는 아래와 같은 2개의 디렉터리에 위치한다.

$ORACLE_HOME/opmn/bin/opmnctl : 로컬 시스템의 오라클 인스턴스 생성 또는 컴포넌트 생성 시에 사용함

$ORACLE_INSTANCE/bin/opmnctl : 오라클 인스턴스에 대한 관리 또는 컴포넌트 생성 시에 사용되고, 해당 인스턴스를 관리하기 위함


참고로, 오라클 퓨전 미들웨어 설치한 계정으로 OPMN 기동하는 것을 권장함


2. opmnctl 문법

opmnctl [verbose] <command> [<options>] 


참고1) verbose : 상세한 메시지 출력

참고2) command : 명령어. 사용할 수 있는 명령어  목록은 help로 출력할 수 있음 


opmnctl help

usage: opmnctl [verbose] [<scope>] <command> [<options>]

verbose: print detailed execution message if available

Permitted <scope>/<command>/<options> combinations are:

scope     command    options
-------  ---------   ---------
          start                         - Start opmn
          startall                      - Start opmn & all managed processes
          stopall                       - Stop opmn & all managed processes
          shutdown                      - Shutdown opmn & all managed processes
[<scope>] startproc   [<attr>=<val> ..] - Start opmn managed processes
[<scope>] restartproc [<attr>=<val> ..] - Restart opmn managed processes
[<scope>] stopproc    [<attr>=<val> ..] - Stop opmn managed processes
[<scope>] reload                        - Trigger opmn to reread opmn.xml
[<scope>] status      [<options>]       - Get managed process status
[<scope>] metric      [<attr>=<val> ..] - Get DMS metrics for managed processes
[<scope>] dmsdump     [<dmsargs>]       - Get DMS metrics for opmn
[<scope>] debug       [<attr>=<val> ..] - Display opmn server debug information
[<scope>] set         [<attr>=<val> ..] - Set opmn log parameters
[<scope>] query       [<attr>=<val>]    - Query opmn log parameters
          launch      [<attr>=<val> ..] - Launch a configured target process
          phantom     [<attr>=<val> ..] - Register phantom processes
          ping        [<max-retry>]     - Ping local opmn
          validate    [<filename>]      - Validate the given opmn xml file
          help                          - Print brief usage description
          usage       [<command>]       - Print detailed usage description
          createinstance                - Create an Oracle Instance
          createcomponent               - Create a specified component
          deleteinstance                - Delete an instance and components
          deletecomponent               - Delete a specified component
          registerinstance              - Register with admin server
          unregisterinstance            - Unregister with admin server
          updateinstanceregistration    - Update instance registration
          updatecomponentregistration   - Update component registration


3) options : 명령어 옵션

 -l : uniqueid와 기타 파라미터 출력

  기타 출력 시에 포맷할 수 있는 -fsep, -rsep, -noheaders, -fmt 등 옵션이 있음  



3. opmctl에서 속성(attribute)


아래와 같은 명령어 예제에서 ias-comonent는 attrbute이고, instance1은 value이다.

 opmnctl startproc ias-component=instance1 


사용 가능한 Attribute 목록과 Value는 아래와 같다.

 * ias-instance : opmn.xml 파일의 <ias-instance> 엘리먼트의 id 속성값과 일치해야 함

 * ias-component : opmn.xml 파일의 <ias-component> 엘리먼트의 id 속성값과 일치해야 함

 * process-type : opmn.xml 파일의 <process-type> 엘리먼트의 id 속성값과 일치해야 함

 * process-set : opmn.xml 파일의 <process-set> 엘리먼트의 id 속성값과 일치해야 함

 * mode : 'sync'  또는 'async'. 명령어 실행 후 동기 또는 비동기를 의미함. 디폴트값은 'sync'임

 * 그외의 속성으로 timeout, uniqueid, sequential, report 등이 있음 



4. 주요 관리 명령어


* opmnctl start : OPMN 프로세스 기동

* opmnctl shutdown : OPMN 프로세스와 다른 관리 프로세스들 모두 강제 종료시킴. opmnctl stopall은 정상 종


* opmnctl startall : OPMN 프로세스와 다른 관리 프로세스들 모두 기동

* opmnctl stopall : OPMN 프로세스와 다른 관리 프로세스들 모두 종료


* opmnctl startproc  ias-component=instance1 : instance1 프로세스를 기동

* opmnctl stopproc  ias-component=instance1 : instance1 프로세스를 종료


* opmnctl reload : opmn.xml을 재로딩함. 즉, 다른 서브 시스템 프로세스 재기동없이, OPMN 프로세스만 재기동 함