ナビゲーションリンクをスキップ | |
印刷ビューの終了 | |
![]() |
マニュアルページセクション 1M: システム管理コマンド Oracle Solaris 11 Information Library (日本語) |
- manage Message Queue brokers
/usr/bin/imqcmd subcommand argument [option…]
/usr/bin/imqcmd [-h | -H]
/usr/bin/imqcmd -v
imqcmd manages the Message Queue broker, including resources such as connection services, physical destinations, durable subscriptions, and transactions. The utility provides a number of subcommands for managing these resources.
imqcmd supports many subcommands. Basic connection and authentication is required for the execution of every imqcmd subcommand. Use the -secure option to specify secure connections. Subcommands and their corresponding arguments and options follow the imqcmd command on the command line. See USAGE and OPTIONS.
The following options are supported:
Specify the name of the host on which the broker instance is running and the port number it is using.
The default value is localhost:7676. If you do not specify the -b option, imqcmd uses the default.
To specify port only, use: -b :7878. This is equivalent to -b localhost:7878
To specify name only, use: -b somehost. This is equivalent to -b somehost:7676.
Specify the ID of the durable subscriber to a topic.
Specify the name of the topic.
Use this option with the list dur and destroy dur subcommands.
Perform action without user confirmation.
Use this option with any subcommand.
Display usage help. Execute nothing else on the command line.
Display usage help, attribute list, and examples. Execute nothing else on the command line.
Specify the interval, in seconds, at which the metrics bkr, metrics dst, and metrics svc subcommands display metrics output.
Use this option with the metrics subcommand.
Specify an alternate Java 2 compatible runtime to use.
Specify the type of metric information to diplay.
Use this option with the metrics bkr, metrics dst, and metrics svc subcommands. The value of metricType depends on whether the metrics are generated for a destination, a service, or a broker.
Use one of the following values to specify metricType:
Total of messages in and out of the broker (default)
Provides the same information as ttl, but specifies the number of messages per second
Connections, virtual memory heap, threads
The following command displays connection, VM heap, and threads metric information for the default broker instance (localhost:7676) every five seconds:
imqcmd metrics bkr -m cxn -int 5
Specify the number of samples the metrics bkr, metrics dst, and metrics svc subcommands display in the metrics output.
Specify the name of the subcommand argument. Depending on the subcommand, this might be the name of a service, a physical destination, a durable subscription, or a transaction ID.
Specify the value of an attribute. Depending on the subcommand argument, this might be the attribute of a broker, service, or destination.
Specify the administrator password.
This option is deprecated. Use the -passfile option instead.
Specify the administrator password.
Specify whether producers, consumers, or both are paused when pausing a destination.
Use this option with the pause dst subcommand. Use one of the following values:
Pause delivery of messages to consumers.
Pause delivery of messages from producers.
Pause delivery of messages to consumers and from producers.
If the -pst option is not specified, pauses both consumers and producers (the equivalent of -pst ALL).
Specify the timeout period in seconds of an imqcmd subcommand. The default value is 10.
Specify the number of retries attempted after an imqcmd subcommand times out.
The default value is 5.
Silent mode. No output is displayed.
Use this option with any subcommand.
Specify a secure administration connection to the broker instance. You must first configure the broker to enable a secure connection service.
Use this option whenever you want a secure communication with the broker.
Specify the service for which the connections are listed.
Use this option with the list cxn subcommand.
Specify the type of a destination: t (topic) or q (queue).
Include temporary destinations when listing destinations using the list dst subcommand.
Specify the administrator user name.
If you omit this value, you are prompted for it.
Display version information. Execute nothing else on the command line.
The following subcommands and associated arguments and options are supported:
Compact the flat-file data store for the destination of the specified type and name. If no type and name are specified, all destinations are compacted. Destinations must be paused before they can be compacted.
Commit the specified transaction
Create a destination of the specified type, with the specified name, and the specified attributes. Destination names must contain only alphanumeric characters (no spaces) and can begin with an alphabetic character or the underscore character (_).
Destroy the destination of the specified type and name.
Destroy the specified durable subscription for the specified Client Identifier.
List all connections of the specified service name on the default broker or on a broker at the specified host and port. If the service name is not specified, all connections are listed.
List all destinations, with option of listing temporary destinations as well .
List all durable subscriptions for the specified destination.
List all connection services on the broker instance.
List all transactions, being tracked by the broker.
Display broker metrics for the broker instance.
Use the -m option to specify the type of metric to display. Use one of the following values to specify metricType:
Specifies the total of messages in and out of the broker (default) .
Provides the same information as ttl, but specifies the number of messages per second.
Connections, virtual memory heap, threads.
Use the -int option to specify the interval (in seconds) at which to display the metrics. The default is 5 seconds.
Use the -msp option to specify the number of samples displayed in the output. A value of -1 means an unlimited number. The default value is -1.
Displays metrics information for the destination of the specified type and name.
Use the -m option to specify the type of metrics to display. Use one of the following values to specify metricType:
Specifies the number of messages flowing in and out of the broker and residing in memory.
Provides the same information as ttl, but specifies the number of messages per second.
Displays consumer related metrics.
Displays disk usage metrics.
Use the -int option to specify the interval (in seconds) at which to display the metrics. The default is 5 seconds.
Use the -msp option to specify the number of samples displayed in the output. A value of -1 means an unlimited number. The default value is 5.
List metrics for the specified service on the broker instance. Use the -m option to specify the type of metric to display. Use one of the following values to specify metricType:
Total of messages in and out of the broker (default)
Provides the same information as ttl, but specifies the number of messages per second
Connections, virtual memory heap, threads
Use the -int option to specify the interval (in seconds) at which to display the metrics. The default is 5 seconds.
Use the -msp option to specify the number of samples displayed in the output. A value of -1 means an unlimited number. The default value is -1.
Pause the broker instance.
Pause the delivery of messages to consumers (-pst CONSUMERS), or from producers (-pst PRODUCERS), or both (-pst ALL), for the destination of the specified type and name. If no destination type or name are specified, all destinations are paused.
Pause the specified service running on the broker instance. You cannot pause the administative service.
Purge messages at the destination with the specified type and name.
Purge all messages for the specified client identifier.
List the current settings of properties of the broker instance. Show the list of running brokers (in a multi-broker cluster) that are connected to the specified broker.
List information about the destination of the specified type and name.
Display information about the specified service running on the broker instance.
List information about the specified transaction.
Forces all the brokers in a cluster to reload the imq.cluster.brokerlist property and update cluster information. This subcommand only applies to broker clusters.
Shut down and restart the broker instance. This command restarts the broker using the options specified when the broker was first started. If you want different options to be in effect, you must shut down the broker and then start it again, specifying the options you want.
Resume the broker instance.
Resumes the delivery of messages for the paused destination of the specified type and name. If no destination type and name are specified, all destinations are resumed.
Resume the specified service running on the broker instance.
Roll back the specified transaction.
Shut down the broker instance
Change the specified attributes for the broker instance.
Update the value of the specified attributes at the specified destination..
Update the specified attribute of the specified service running on the broker instance.
You can specify attributes with the create and update subcommands. Applicable attributes depend on the subcommand arguments.
The following attributes are supported:
Queue (dst):
Value: Integer (maximum total size of messages, in bytes)
Default: 0 (unlimited)
Value: Integer (maximum size of a single message, in bytes)
Default: 0 (unlimited)
Value: Integer (maximum total number of messages)
Default: 0 (unlimited)
Value: Integer Initial number of queued messages sent to active consumers before load-balancing starts A value of -1 means an unlimited number.
Default: 1000
Value: Boolean (destination limited to delivering messages to local consumers only) Default: false
Value: Specify how broker responds when memory-limit is reached. Use one of the following values:
Slows down producers
Purges oldest messages
Rejects the newest messages
Default: REJECT_NEWEST
Value: Boolean Specify messages be delivered to remote consumers only if there are no consumers on the local broker. Requires that the destination not be restricted to local-only delivery (isLocalOnly = false)
Default: false
Value: Integer (maximum number of active consumers in load-balanced delivery) A value of -1 means an unlimited number.
Default: 1
Value: Integer (maximum number of backup consumers in load-balanced delivery) A value of -1 means an unlimited number.
Default: 0
Value: (maximum total number of producers) A value of -1 means an unlimited number.
Default: -1
Specify whether a destination's dead messages are discarded or put on the dead message queue.
Default: true
Topic (dst):
Value: Integer Maximum number of messages delivered to a consumer in a single batch. A value of -1 means an unlimited number.
Default: 1000
Value: Boolean (destination limited to delivering messages to local consumers only)
Default: false
Value: Specify how broker responds when memory-limit is reached. Use one of the following values:
Slows down producers
Purges the oldest messages
Rejects the newest messages
Default: REJECT_NEWEST
Value: Integer (maximum size of a single message, in bytes)
Default: 0 (unlimited)
Value: Integer (maximum total number of messages) A value of -1 means an unlimited number.
Default: -1
Value: (maximum total number of producers)
Default: 0 (unlimited)
Value: Integer (maximum total size of messages, in bytes) A value of -1 means an unlimited number.
Default: -1
Specify whether a destination's dead messages are discarded or put on the dead message queue.
Default: true
Broker (bkr):
Value: Boolean. Set the useDMQ attribute to true to enable all autocreated physical destinations on a broker to use the dead message queue. Set the useDMQ attribute to false to disable all autocreated physical destinations on a broker from using the dead message queue.
Default: true
Value: Boolean
Default: true
Value: Integer (maximum number of consumers that can be active in load-balanced delivery from an autocreated queue destination) A value of -1 means an unlimited number.
Default: 1
Value: Integer (maximum number of backup consumers that can take the place of active consumers) A value of -1 means an unlimited number.
Default: 0
Value: Boolean
Default: true
Value: String (location of cluster configuration file)
Default: none
Value: Integer (maximum size of a log file, in bytes)
Default: 0 (no rollover based on size)
Value: Integer (maximum age of a log file, in seconds)
Default: 0 (no rollover based on age)
Value: String (NONE, ERROR, WARNING, INFO)
Default: INFO
Value: Integer (maximum size of a single message, in bytes)
Default: 70m
Value: Integer
Default: 7676
Value: Integer (maximum total number of messages)
Default: 0 (no limit)
Value: Integer (maximum total size of messages, in bytes)
Default: 0 (no limit)
Service (svc):
Value: Integer (maximum threads assigned)
Default: Depends on service
Value: Integer (minimum threads assigned)
Default: Depends on service
Value: Integer
Default: 0 (dynamically allocated)
例 1 Shutting Down a Broker
The following command shuts down a broker for hostname myserver on port 7676:
mqcmd shutdown bkr -b myserver:7676
例 2 Restarting a Broker
The following command restarts a broker for hostname myserver:
imqcmd restart bkr -b myserver
例 3 Pausing a Service
The following command pauses a broker for hostname localhost on port 7676, with a serviceName of jms:
imqcmd pause svc -n jms -b :7676
例 4 Resuming a Service
The following command resumes a service for hostname localhost on port 7676, with a serviceName of jms:
imqcmd resume svc -n jms -b myserver:7676
例 5 Creating a Queue Destination
The following command creates a queue destination for hostname myserver on port 7676, with a destName of myFQ, a queueDeliveryPolicy of Failover, and a maxBytesPerMsg of 10000:
imqcmd create dst -n myFQ -t q -o "queueDeliveryPolicy=f" \ -o "maxBytesPerMsg=10000" -b myserver:7676
例 6 Purging a Queue Destination
The following command purges a queue destination for hostname myserver on port 7676, with a destName of myFQ:
imqcmd purge dst -n myFQ -t q -b myserver:7676
例 7 Listing Destinations on a Broker
The following command lists destinations for hostname myserver on port 7676:
imqcmd list dst -b myserver:7676
例 8 Updating a Portmapper Port
The following command updates a portmapper port on hostname myserver from port 7676 to 7878:
imqcmd update bkr -o "imq.portmapper.port=7878"
例 9 Updating the Maximum Number of Messages in the Queue
The following command updates the maximum number of messages in the queue to 2000 for myserver on port 8080 with a destName of TestQueue:
imqcmd update dst -b myserver:8080 -n TestQueue -t q -o "maxNumMsgs=2000"
例 10 Updating the Maximum Threads
The following command updates the maximum threads jms connection service to 200 for hostname localhost on port 7676:
imqcmd update svc -n jms -o "minThreads=200"
例 11 Listing Durable Subscriptions
The following command lists durable subscriptions for a topic with hostname localhost on port 7676 with a destName of myTopic:
imqcmd list dur -d myTopic
例 12 Destroying Durable Subscriptions
The following command destroys subscriptions for hostname localhost on port 7676 with a dursubName of myDurSub and a client_ID of 111.222.333.444:
imqcmd destroy dur -n myDurSub -c "111.222.333.444"
例 13 Listing All Transactions
The following command lists all transactions on a broker with hostname localhost on port 7676:
imqcmd list txn
例 14 Displaying Information About a Transaction
The following command displays information about a transaction with hostname localhost on port 7676, and a transactionID of 1234567890
imqcmd query txn -n 1234567890
例 15 Committing a Transaction
The following command commits a transaction with hostname localhost on port 7676, and a transactionID of 1234567890:
imqcmd commit txn -n 1234567890
The following environment variables affect the execution of this command:
Specify the Java 2 compatible runtime. When this environment variable is not set it defaults to /usr/j2se.
The following exit values are returned:
Successful completion.
An error occurred.
See attributes(5) for descriptions of the following attributes:
|
imqadmin(1M), imqbrokerd(1M), imqdbmgr(1M), imqkeytool(1M), imqobjmgr(1M), imqusermgr(1M), attributes(5)
Sun Java System Message Queue Administrator's Guide