Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 12. Management Tools and Consoles
12.1. Command-line utilities Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
12.1.1. Command-line Management utilities Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
The command-line tools are management and diagnostic tools for use at the shell prompt.
Utility | Description |
---|---|
qpid-config | Display and configure exchanges, queues, and bindings in the broker |
qpid-tool | Access configuration, statistics, and control within the broker |
qpid-queue-stats | Monitor the size and enqueue/dequeue rates of queues in a broker |
qpid-ha | Configure and view clusters |
qpid-route | Configure federated routes among brokers |
qpid-stat | Display details and statistics for various broker objects |
qpid-printevents | Subscribes to events from a broker and prints details of events raised to the console window |
12.1.2. Using qpid-config Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
- View the full list of commands by running the
qpid-config --help
command from the shell prompt:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - View a summary of all exchanges and queues by using the
qpid-config
without options:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - List information on all existing queues by using the
queues
command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add new queues with the
add queue
command and the name of the queue to create:qpid-config add queue queue_name
$ qpid-config add queue queue_name
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - To delete a queue, use the
del queue
command with the name of the queue to remove:qpid-config del queue queue_name
$ qpid-config del queue queue_name
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - List information on all existing exchanges with the
exchanges
command. Add the-r
option ("recursive") to also see binding information:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add new exchanges with the
add exchange
command. Specify the type (direct, topic or fanout) along with the name of the exchange to create. You can also add the--durable
option to make the exchange durable:qpid-config add exchange direct exchange_name --durable
$ qpid-config add exchange direct exchange_name --durable
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - To delete an exchange, use the
del exchange
command with the name of the exchange to remove:qpid-config del exchange exchange_name
$ qpid-config del exchange exchange_name
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
12.1.3. Using qpid-tool Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
- The
qpid-tool
creates a connection to a broker, and commands are run within the tool, rather than at the shell prompt itself. To create the connection, run theqpid-tool
at the shell prompt with the name or IP address of the machine running the broker you wish to view. You can also append a TCP port number with a:
character:qpid-tool localhost
$ qpid-tool localhost Management Tool for QPID qpid:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - If the connection is successful, qpid-tool will display a
qpid:
prompt. Typehelp
at this prompt to see the full list of commands:Copy to Clipboard Copied! Toggle word wrap Toggle overflow qpid-tool
uses the word objects to refer to queues, exchanges, brokers and other such devices. To view a list of all existing objects, typelist
at the prompt:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - You can choose which objects to list by also specifying a class:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - To view details of an object class, use the
schema
command and specify the class:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - To exit the tool and return to the shell, type
quit
at the prompt:qpid: quit Exiting...
qpid: quit Exiting...
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
12.1.4. Using qpid-queue-stats Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
Run the command
qpid-queue-stats
to launch the tool.
The tool will begin to report stats for the broker on the current machine, with the following format:
The queues on the broker are listed on the left. The Sec column is the sample rate. The tool is hard-coded to poll the broker in 10 second intervals. The Depth column reports the number of messages in the queue. Enq Rate is the number of messages added to the queue (enqueued) since the last sample. Deq Rate is the number of messages removed from the queue (dequeued) since the last sample.
To view the queues on another server, use the
-a
switch, and provide a remote server address, and optionally the remote port and authentication credentials.
For example, to examine the queues on a remote server with the address
192.168.1.145
, issue the command:
qpid-queue-stats -a 192.168.1.145
qpid-queue-stats -a 192.168.1.145
To examine the queues on the server
broker1.mydomain.com
:
qpid-queue-stats -a broker1.mydomain.com
qpid-queue-stats -a broker1.mydomain.com
To examine the queues on the server
broker1.mydomain.com
, where the broker is running on port 8888:
qpid-queue-stats -a broker1.mydomain.com:8888
qpid-queue-stats -a broker1.mydomain.com:8888
To examine the queues on the server
192.168.1.145
, which requires authentication:
qpid-queue-stats -a username/password@192.168.1.145
qpid-queue-stats -a username/password@192.168.1.145