Developing your own resource monitoring program
You can develop your own program to monitor system resources.
Each queue manager publishes resource usage data to topics. This data is consumed by subscribers to those topics. When a queue manager starts, the queue manager publishes a set of messages on meta-topics. These messages describe which resource usage topics are supported by the queue manager, and the content of the messages published to those topics. Administrative tools can subscribe to the meta data to discover what resource usage information is available, and on what topics, and then subscribe to the advertised topics.
$SYS/MQ/INFO/QMGR/QMGR-NAME/Monitor/class[/instance]/type]
For a list of possible classes and types, see Monitoring system resource usage by using the amqsrua command, and also see Metrics
published on the system topics in the main IBM® MQ documentation.- On Linux® and UNIX platforms, MQ_INSTALLATION_PATH/samp/
- On Windows platforms, MQ_INSTALLATION_PATH\tools\c\Samples\
- Creates a non-durable subscription to the topics identified by the input parameters.
- Calls MQGET repeatedly to get messages from the topics, and writes to stdout.
- Writes a message for each MQI reason (other than MQRC_NONE).
- Stops if there is a MQI completion code of MQCC_FAILED, or when the requested number of resource usage publications have been consumed.
When your program is ready, you must run it on an IBM MQ client that connects to the queue manager you are monitoring. See Setting up a queue manager to accept client connections.