machcoordinatoradmin
Coordinator 에서 클러스터 전체에 대한 관리 도구이다.
Cluster Edition 패키지에만 존재한다.
옵션 및 기능
machcoordinatoradmin의 옵션은 아래와 같다. 앞의 설치 절에서 설명한 기능은 생략한다.
mach@localhost:~$ machcoordinatoradmin -h
옵션 | 설명 |
---|---|
-u, –startup | Coordinator 프로세스를 구동 |
-s, –shutdown | Coordinator 프로세스를 종료 |
-k, –kill | Coordinator 프로세스를 중단 |
-c, –createdb | Coordinator의 메타를 생성 |
-d, –destroydb | Coordinator의 메타를 삭제하고, $MACHBASE_COORDINATOR_HOME/package에 있는 패키지 파일들을 삭제 |
-e, –check | Coordinator 프로세스가 작동 중인지 확인 |
-i, –silence | 출력 없이 실행 |
--configuration[=name] | configuration 설정에서의 키와 값 출력(특정 키만 출력 가능) |
--configure | Coordinator 에 설정된 system property 를 확인 |
--activate | Cluster status를 Service로 전환 |
--deactivate | Cluster status를 Deactivate로 전환 |
--list-package[=package] | 등록한 Package들의 정보를 나열(특정 Package만 출력 가능) |
--add-package=package | Package를 추가 |
--remove-package=package | Package를 삭제 |
--list-node[=node] | Node들의 정보를 나열(특정 Node만 출력 가능) |
--add-node=node | Node를 추가 |
--remove-node=node | Node를 삭제 |
--upgrade-node=node | Node를 업그레이드 |
--startup-node=node | Node를 구동 |
--shutdown-node=node | Node를 종료 |
--kill-node=node | Node를 중단 |
--cluster-status | Cluster의 각 Node 상태를 출력 |
--cluster-status-full | Cluster의 각 Node 상태를 상세하게 출력 |
--cluster-node | Cluster의 정보를 출력 |
--set-group-state=[normal | readonly] | 특정 warehouse 그룹의 상태를 변경 |
--get-host-resource | 각 Node가 위치한 Host 자원 정보를 출력 |
--host-resource-enable | 각 노드의 Host 자원 정보 수집을 시작 |
--host-resource-disable | 각 노드의 Host 자원 정보 수집을 멈춤 |
부가 옵션 | 설명 | 필수 옵션 |
---|---|---|
--file-name=filename | 파일 이름 | --add-package |
--port-no=portno | 포트 번호 | --add-node |
--deployer=node | Deployer의 노드 이름 | --add-node |
--package-name=packagename | 설치 원본이 될 Package 이름 | --add-package |
--home-path=path | Deployer 서버 기준, 현재 Node의 설치 경로 | --add-node |
--node-type=[broker | warehouse] | 설치할 노드의 타입(broker / warehouse 중 선택) | --add-node |
--group=groupname | 설치할 노드의 그룹 이름 | --add-node |
--replication=host:port | Replication을 주고 받을 host:port | --add-node |
--no-replicate | 설치할 노드의 Replication을 사용하지 않음 | --add-node |
--primary=host:port | Secondary Coordinator 설치 시 Primary Coordinator의 노드 이름을 지정 | -u, –startup |
--host=host | Host 자원 정보를 출력할 특정 Host 지정 | --get-host-resource |
--metric=[cpu|memory|disk|network] | Host 자원 정보를 출력할 특정 Metric 지정 | --get-host-resource |
동작 여부 확인
Example:
mach@localhost:~$ machcoordinatoradmin -e
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Machbase Coordinator is running with pid(29245)!
메타 생성 / 삭제
Example:
mach@localhost:~$ machcoordinatoradmin -c
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Coordinator metadata created successfully.
mach@localhost:~$ machcoordinatoradmin -d
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Coordinator metadata destroyed successfully.
Configuration 설정 출력
Syntax:
machcoordinatoradmin --configuration[=name]
Example:
mach@localhost:~$ machcoordinatoradmin --configuration
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Name : CLUSTER
Value : 3
Name : DECISION
Value : ON
Name : HOST-RESOURCE
Value : OFF
mach@localhost:~$ machcoordinatoradmin --configuration=decision
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Name : DECISION
Value : ON
Format : text/plain
System Property 확인
Syntax
machcoordinatoradmin --configure
Example
mach@localhost:~$ machcoordinatoradmin --configure
CLUSTER_LINK_HOST=192.168.0.30
CLUSTER_LINK_PORT_NO=36110
CLUSTER_LINK_THREAD_COUNT=16
CLUSTER_LINK_MAX_LISTEN=512
CLUSTER_LINK_MAX_POLL=4096
CLUSTER_LINK_ACCEPT_TIMEOUT=5000000
CLUSTER_LINK_CHECK_INTERVAL=1000000
CLUSTER_LINK_CONNECT_RETRY_TIMEOUT=60000000
CLUSTER_LINK_CONNECT_TIMEOUT=5000000
CLUSTER_LINK_HANDSHAKE_TIMEOUT=5000000
CLUSTER_LINK_LONG_TERM_CALLBACK_INTERVAL=1000000
CLUSTER_LINK_LONG_WAIT_INTERVAL=1000000
CLUSTER_LINK_RECEIVE_TIMEOUT=5000000
CLUSTER_LINK_REQUEST_TIMEOUT=60000000
CLUSTER_LINK_SEND_TIMEOUT=5000000
CLUSTER_LINK_SESSION_TIMEOUT=3600000000
CLUSTER_LINK_ERROR_ADD_ORIGIN_HOST=0
CLUSTER_LINK_BUFFER_SIZE=33554432
..
..
Cluster Status 변경
Example:
mach@localhost:~$ machcoordinatoradmin --activate
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Name : CLUSTER
Value : 3
Format : text/plain
mach@localhost:~$ machcoordinatoradmin --deactivate
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Name : CLUSTER
Value : 0
Format : text/plain
패키지 정보 나열
Syntax:
machcoordinatoradmin --list-package[=package]
Example:
mach@localhost:~$ machcoordinatoradmin --list-package
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Package Name : machbase
File Name : machbase-cluster-6bab497c9.develop-LINUX-X86-64-release-lightweight.tgz
File Size : 64630670 bytes
Package Name : machbase2
File Name : machbase-cluster-e3c0717.develop-LINUX-X86-64-release-lightweight.tgz
File Size : 64677030 bytes
mach@localhost:~$ machcoordinatoradmin --list-package=machbase
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Package Name : machbase
File Name : machbase-cluster-6bab497c9.develop-LINUX-X86-64-release-lightweight.tgz
File Size : 64630670 bytes
노드 정보 나열
Syntax:
machcoordinatoradmin --list-node[=node]
Example:
mach@localhost:~$ machcoordinatoradmin --list-node
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Node Name : 192.168.0.32:5101
Node Type : coordinator
HTTP Admin Port : 5102
Group Name : Coordinator
Desired State : primary
Actual State : primary
Coordinator Host : 192.168.0.32:5101
Last Response Time : 497590
Last Modify Time : 421020408
Last Response Elapsed : 1006148
Node Name : 192.168.0.32:5201
Node Type : deployer
Group Name : Deployer
Desired State : normal
Actual State : normal
Coordinator Host : 192.168.0.32:5101
Last Response Time : 497594
Last Modify Time : 404915419
Last Response Elapsed : 1006128
Node Name : 192.168.0.32:5301
Node Type : broker
Port Number : 5757
Deployer : 192.168.0.32:5201
Package Name : machbase
Home Path : /home/machbase/broker1
Group Name : Broker
Desired State : leader
Actual State : leader
Coordinator Host : 192.168.0.32:5101
Last Response Time : 497544
Last Modify Time : 353606480
Last Response Elapsed : 1006157
Node Name : 192.168.0.32:5401
Node Type : warehouse
Port Number : 5400
Deployer : 192.168.0.32:5201
Package Name : machbase
Home Path : /home/machbase/warehouse_a1
Group Name : Group1
Desired State : normal
Actual State : normal
Coordinator Host : 192.168.0.32:5101
Last Response Time : 497556
Last Modify Time : 332480933
Last Response Elapsed : 1006160
mach@localhost:~$ machcoordinatoradmin --list-node=192.168.0.32:5401
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Node Name : 192.168.0.32:5401
Node Type : warehouse
Port Number : 5400
Deployer : 192.168.0.32:5201
Package Name : machbase
Home Path : /home/cumulus/warehouse_a1
Group Name : Group1
Desired State : normal
Actual State : normal
Coordinator Host : 192.168.0.32:5101
Last Response Time : 648879
Last Modify Time : 419153148
Last Response Elapsed : 1005962
Cluster의 Node 상태 출력
Example:
mach@localhost:~$ machcoordinatoradmin --cluster-status
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
+-------------+-------------------+-------------------+-------------------+--------------+
| Node Type | Node Name | Group Name | Group State | State |
+-------------+-------------------+-------------------+-------------------+--------------+
| coordinator | 192.168.0.32:5101 | Coordinator | normal | primary |
| deployer | 192.168.0.32:5201 | Deployer | normal | normal |
| broker | 192.168.0.32:5301 | Broker | normal | leader |
| warehouse | 192.168.0.32:5401 | Group1 | normal | normal |
+-------------+-------------------+-------------------+-------------------+--------------+
mach@localhost:~$ machcoordinatoradmin --cluster-status-full
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
+-------------+-------------------+-------------------+-------------------+-------------------------------+-------------+
| Node Type | Node Name | Group Name | Group State | Desired & Actual State | RP State |
+-------------+-------------------+-------------------+-------------------+-------------------------------+-------------+
| coordinator | 192.168.0.32:5101 | Coordinator | normal | primary | primary | ----------- |
| deployer | 192.168.0.32:5201 | Deployer | normal | normal | normal | ----------- |
| broker | 192.168.0.32:5301 | Broker | normal | leader | leader | ----------- |
| warehouse | 192.168.0.32:5401 | Group1 | normal | normal | normal | ----------- |
+-------------+-------------------+-------------------+-------------------+-------------------------------+-------------+
Cluster 정보 출력
Example:
mach@localhost:~$ machcoordinatoradmin --cluster-node
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Token Pid : 29245
Token Time : 1553153902646178
Modify Time : 1553154010296715
Modify Count : 8
Cluster Status : Service
Broker : 192.168.0.32:5301
Warehouse : 192.168.0.32:5401
Group State 변경
Syntax:
machcoordinatoradmin --set-group-state=[ normal | readonly ] --group=group
Example:
mach@localhost:~$ machcoordinatoradmin --set-group-state=readonly --group=Group1
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Group Name: Group1
Flag : 1
mach@localhost:~$ machcoordinatoradmin --cluster-status
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
+-------------+-------------------+-------------------+-------------------+--------------+
| Node Type | Node Name | Group Name | Group State | State |
+-------------+-------------------+-------------------+-------------------+--------------+
| coordinator | 192.168.0.32:5101 | Coordinator | normal | primary |
| deployer | 192.168.0.32:5201 | Deployer | normal | normal |
| broker | 192.168.0.32:5301 | Broker | normal | leader |
| warehouse | 192.168.0.32:5401 | Group1 | readonly | normal |
+-------------+-------------------+-------------------+-------------------+--------------+
Host Resource 출력
Syntax:
machcoordinatoradmin --host-resource-enable [--metric=metric] [host=host]
Example:
mach@localhost:~$ machcoordinatoradmin --host-resource-enable
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Name : HOST-RESOURCE
Value : ON
Format : text/plain
mach@localhost:~$ machcoordinatoradmin --get-host-resource
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Host Name : 192.168.0.32
CPU Info :
Model Name : Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz
Number of CPUs : 8
Number of CPU Cores : 4
CPU Utilization : 14.0%
CPU IOWait Ratio : 0.0%
Memory Info :
Physical Memory Utilization : 99.1%
Virtual Memory Utilization : 98.6%
Network Info :
Receive Bytes(per second) : 42809
Receive Packets(per second) : 337
Transmit Bytes(per second) : 42885
Transmit Packets(per second) : 332
Disk Info :
/dev/sda1 : 87.4%
|-> 192.168.0.32:5101 /home/cumulus/coordinator1
|-> 192.168.0.32:5301 /home/cumulus/broker1
|-> 192.168.0.32:5401 /home/cumulus/warehouse_a1
Host Name : 192.168.0.33
CPU Info :
Model Name : Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz
Number of CPUs : 8
Number of CPU Cores : 4
CPU Utilization : 2.0%
CPU IOWait Ratio : 0.0%
Memory Info :
Physical Memory Utilization : 46.9%
Virtual Memory Utilization : 22.8%
Network Info :
Receive Bytes(per second) : 12336
Receive Packets(per second) : 103
Transmit Bytes(per second) : 13500
Transmit Packets(per second) : 103
Disk Info :
/dev/sda1 : 64.2%
|-> 192.168.0.33:5101 /home/cumulus/coordinator2
|-> 192.168.0.33:5401 /home/cumulus/warehouse_a2
mach@localhost:~$ machcoordinatoradmin --get-host-resource --metric=cpu
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Host Name : 192.168.0.32
CPU Info :
Model Name : Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz
Number of CPUs : 8
Number of CPU Cores : 4
CPU Utilization : 13.9%
CPU IOWait Ratio : 0.0%
Host Name : 192.168.0.33
CPU Info :
Model Name : Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz
Number of CPUs : 8
Number of CPU Cores : 4
CPU Utilization : 1.9%
CPU IOWait Ratio : 0.0%
mach@localhost:~$ machcoordinatoradmin --get-host-resource --host=192.168.0.33
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Host Name : 192.168.0.33
CPU Info :
Model Name : Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz
Number of CPUs : 8
Number of CPU Cores : 4
CPU Utilization : 2.0%
CPU IOWait Ratio : 0.0%
Memory Info :
Physical Memory Utilization : 46.9%
Virtual Memory Utilization : 22.8%
Network Info :
Receive Bytes(per second) : 12588
Receive Packets(per second) : 106
Transmit Bytes(per second) : 13330
Transmit Packets(per second) : 100
Disk Info :
/dev/sda1 : 64.2%
|-> 192.168.0.33:5101 /home/cumulus/coordinator2
|-> 192.168.0.33:5401 /home/cumulus/warehouse_a2
mach@localhost:~$ machcoordinatoradmin --host-resource-disable
-------------------------------------------------------------------------
Machbase Coordinator Administration Tool
Release Version - e3c0717.develop
Copyright 2014, MACHBASE Corp. or its subsidiaries
All Rights Reserved
-------------------------------------------------------------------------
Name : HOST-RESOURCE
Value : OFF
Format : text/plain
최근 업데이트