AMQ Broker에는 브로커 토폴로지의 브로커 및 큐에서 다양한 상태 점검을 수행할 수 있는 명령줄 유틸리티가 포함되어 있습니다.
다음 예제에서는 유틸리티를 사용하여 상태 점검을 실행하는 방법을 보여줍니다.
절차
브로커 토폴로지에서 특정 브로커(즉, 노드)에 대해 실행할 수 있는 검사 목록을 참조하십시오.
<broker_instance_dir>/bin/artemis help check node
$ <broker_instance_dir>/bin/artemis help check node
Copy to ClipboardCopied!Toggle word wrapToggle overflow
artemis check node 명령과 함께 사용할 수 있는 옵션 세트를 설명하는 출력이 표시됩니다.
NAME
artemis check node - Check a node
SYNOPSIS
artemis check node [--backup] [--clientID <clientID>]
[--diskUsage <diskUsage>] [--fail-at-end] [--live]
[--memoryUsage <memoryUsage>] [--name <name>] [--password <password>]
[--peers <peers>] [--protocol <protocol>] [--silent]
[--timeout <timeout>] [--up] [--url <brokerURL>] [--user <user>]
[--verbose]
OPTIONS
--backup
Check that the node has a backup
--clientID <clientID>
ClientID to be associated with connection
--diskUsage <diskUsage>
Disk usage percentage to check or -1 to use the max-disk-usage
--fail-at-end
If a particular module check fails, continue the rest of the checks
--live
Check that the node has a live
--memoryUsage <memoryUsage>
Memory usage percentage to check
--name <name>
Name of the target to check
--password <password>
Password used to connect
--peers <peers>
Number of peers to check
--protocol <protocol>
Protocol used. Valid values are amqp or core. Default=core.
--silent
It will disable all the inputs, and it would make a best guess for any required input
--timeout <timeout>
Time to wait for the check execution, in milliseconds
--up
Check that the node is started, it is executed by default if there are no other checks
--url <brokerURL>
URL towards the broker. (default: tcp://localhost:61616)
--user <user>
User used to connect
--verbose
Adds more information on the execution
NAME
artemis check node - Check a node
SYNOPSIS
artemis check node[--backup][--clientID <clientID>][--diskUsage <diskUsage>][--fail-at-end][--live][--memoryUsage <memoryUsage>][--name <name>][--password <password>][--peers <peers>][--protocol <protocol>][--silent][--timeout <timeout>][--up][--url <brokerURL>][--user <user>][--verbose]
OPTIONS
--backup
Check that the node has a backup
--clientID<clientID>
ClientID to be associated with connection
--diskUsage<diskUsage>
Disk usage percentage to check or -1 to use the max-disk-usage
--fail-at-end
If a particular module check fails, continue the rest of the checks
--live
Check that the node has a live
--memoryUsage<memoryUsage>
Memory usage percentage to check
--name<name>
Name of the target to check
--password<password>
Password used to connect
--peers<peers>
Number of peers to check
--protocol<protocol>
Protocol used. Valid values are amqp or core. Default=core.
--silent
It will disable all the inputs, and it would make a best guess for any required input
--timeout<timeout>
Time to waitfor the check execution, in milliseconds
--up
Check that the node is started, it is executed by default if there are no other checks
--url<brokerURL>
URL towards the broker. (default: tcp://localhost:61616)--user<user>
User used to connect
--verbose
Adds more information on the execution
Copy to ClipboardCopied!Toggle word wrapToggle overflow
예를 들어 로컬 브로커의 디스크 사용량이 브로커에 대해 구성된 최대 디스크 사용량보다 낮은지 확인합니다.
$ <broker_instance_dir>/bin/artemis check node--url tcp://localhost:61616 --diskUsage-1
Connection brokerURL = tcp://localhost:61616
Running NodeCheck
Checking that the disk usage is lessthen the max-disk-usage ... success
Checks run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.065 sec - NodeCheck
Copy to ClipboardCopied!Toggle word wrapToggle overflow
이전 예에서 --diskUsage 옵션에 대해 -1 값을 지정하면 유틸리티에서 브로커에 대해 구성된 최대 디스크 사용량에 대해 디스크 사용량을 확인합니다. 브로커의 최대 디스크 사용량은 broker.xml 구성 파일에서 max-disk-usage 매개변수를 사용하여 구성됩니다. max-disk-usage 에 지정된 값은 브로커가 사용할 수 있는 사용 가능한 물리 디스크 공간의 백분율을 나타냅니다.
브로커 토폴로지의 특정 큐에 대해 실행할 수 있는 검사 목록을 참조하십시오.
<broker_instance_dir>/bin/artemis help check queue
$ <broker_instance_dir>/bin/artemis help check queue
Copy to ClipboardCopied!Toggle word wrapToggle overflow
Artemis 검사 대기열 명령과 함께 사용할 수 있는 옵션 세트를 설명하는 출력이 표시됩니다.
NAME
artemis check queue - Check a queue
SYNOPSIS
artemis check queue [--browse <browse>] [--clientID <clientID>]
[--consume <consume>] [--fail-at-end] [--name <name>]
[--password <password>] [--produce <produce>] [--protocol <protocol>]
[--silent] [--timeout <timeout>] [--up] [--url <brokerURL>]
[--user <user>] [--verbose]
OPTIONS
--browse <browse>
Number of the messages to browse or -1 to check that the queue is
browsable
--clientID <clientID>
ClientID to be associated with connection
--consume <consume>
Number of the messages to consume or -1 to check that the queue is consumable
--fail-at-end
If a particular module check fails, continue the rest of the checks
--name <name>
Name of the target to check
--password <password>
Password used to connect
--produce <produce>
Number of the messages to produce
--protocol <protocol>
Protocol used. Valid values are amqp or core. Default=core.
--silent
It will disable all the inputs, and it would make a best guess for any required input
--timeout <timeout>
Time to wait for the check execution, in milliseconds
--up
Check that the queue exists and is not paused, it is executed by default if there are no other checks
--url <brokerURL>
URL towards the broker. (default: tcp://localhost:61616)
--user <user>
User used to connect
--verbose
Adds more information on the execution
NAME
artemis check queue - Check a queue
SYNOPSIS
artemis check queue [--browse <browse>][--clientID <clientID>][--consume <consume>][--fail-at-end][--name <name>][--password <password>][--produce <produce>][--protocol <protocol>][--silent][--timeout <timeout>][--up][--url <brokerURL>][--user <user>][--verbose]
OPTIONS
--browse<browse>
Number of the messages to browse or -1 to check that the queue is
browsable
--clientID<clientID>
ClientID to be associated with connection
--consume<consume>
Number of the messages to consume or -1 to check that the queue is consumable
--fail-at-end
If a particular module check fails, continue the rest of the checks
--name<name>
Name of the target to check
--password<password>
Password used to connect
--produce<produce>
Number of the messages to produce
--protocol<protocol>
Protocol used. Valid values are amqp or core. Default=core.
--silent
It will disable all the inputs, and it would make a best guess for any required input
--timeout<timeout>
Time to waitfor the check execution, in milliseconds
--up
Check that the queue exists and is not paused, it is executed by default if there are no other checks
--url<brokerURL>
URL towards the broker. (default: tcp://localhost:61616)--user<user>
User used to connect
--verbose
Adds more information on the execution
Copy to ClipboardCopied!Toggle word wrapToggle overflow
유틸리티는 단일 명령으로 여러 옵션을 실행할 수 있습니다. 예를 들어 로컬 브로커의 기본 helloworld 대기열에서 1000개의 메시지의 프로덕션, 검색 및 소비를 확인하려면 다음 명령을 사용합니다.
$ <broker_instance_dir>/bin/artemis check queue --name helloworld --produce1000--browse1000--consume1000
Connection brokerURL = tcp://localhost:61616
Running QueueCheck
Checking that a producer can send 1000 messages to the queue helloworld ... success
Checking that a consumer can browse 1000 messages from the queue helloworld ... success
Checking that a consumer can consume 1000 messages from the queue helloworld ... success
Checks run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.882 sec - QueueCheck
Copy to ClipboardCopied!Toggle word wrapToggle overflow
이전 예에서 대기열 확인을 실행할 때 브로커 URL을 지정하지 않은 것을 관찰합니다. URL을 명시적으로 지정하지 않으면 유틸리티는 기본값 tcp://localhost:61616 을 사용합니다.