I found the best way of exploring the data was to turn on debug for the sample program. For example
./amqsrua -m QMA -d 9
where -m is the queue manager name and -d gives a debug level.
If you create a subscription for METADATA you get back the name and types of the fields, for example, for queue manager QMA, use
topicstr($SYS/MQ/INFO/QMGR/QMA/Monitor/METADATA/CPU/TYPES)and it returns two options, SystemSummary and QmgrSummary.
To get a list of fields and the properties subscribe to
I did not use this method, I wrote some C structures to map the index values to the description.
To get the actual data returned, subscribe to TOPICSTR($SYS/MQ/INFO/QMGR/QMA/Monitor/CPU/SystemSummary) with no METADATA.
Note: Remember a subscription $SYS/MQ/INFO/QMGR/QMA/Monitor/CPU/* will not work, but the generic $SYS/MQ/INFO/QMGR/QMA/Monitor/CPU/# will work.
The data below comes from running the sample program.
Subscribe to topic: $SYS/MQ/INFO/QMGR/QMA/Monitor/METADATA/CLASSES
- 0000 CPU Platform central processing Unit:s
- 0001 DISK Platform persistent data stores
- 0002 STATMQI API usage statistics
- 0003 STATQ API per-queue usage statistics
Subscribing to topic: $SYS/MQ/INFO/QMGR/QMA/Monitor/METADATA/CPU/TYPES
- 0000 0000 SystemSummary CPU performance – platform wide
- 0000 0001 QMgrSummary CPU performance – running queue manager
Where the 0000 in the first column shows this is CPU data.
Subscribing to topic: $SYS/MQ/INFO/QMGR/QMA/Monitor/METADATA/CPU/SystemSummary
gives the fields when you subscribe to the data.
- 0000 0000 0000 10000 User CPU time percentage
- 0000 0000 0001 10000 System CPU time percentage
- 0000 0000 0002 0100 CPU load – one minute average
- 0000 0000 0003 0100 CPU load – five minute average
- 0000 0000 0004 0100 CPU load – fifteen minute average
- 0000 0000 0005 10000 RAM free percentage
- 0000 0000 0006 1048576 RAM total bytes
- 0000 0000 $SYS/MQ/INFO/QMGR/QMA/Monitor/CPU/SystemSummary This is the topic string you need to subscribe to, to get the data.
For 0000 0000 0004 0100 CPU load – fifteen minute average the data is as follows
- 0000 First column the monitoring-class from 0000 indicates CPU
- 0000 Second column is Monitoring-Type from 0000 0000SystemSummaryCPU
- 0004 Third column – this will be the key of the published data.
- 10000 Interpretation of the data, see below. 10000 means this is a percentage value.
For the example record: Monitoring-class = 0, Monitoring-Type = 0, Key = 4, the data will be for CPU load – fifteen minute average, as a percentage value
For Monitoring-class = 1, Monitoring-Type = 2, Key = 4, the data will be for Delta: Log – physical bytes written.
The units are defined in cmqcfc.h as
- MQIAMO_MONITOR_Unit: 1
- MQIAMO_MONITOR_Delta: 2
- MQIAMO_MONITOR_Hundredths: 100
- MQIAMO_MONITOR_KB 1024
- MQIAMO_MONITOR_Percent: 10000
- MQIAMO_MONITOR_MICROSEC 1000000
- MQIAMO_MONITOR_MB 1048576
- MQIAMO_MONITOR_GB 100000000
To see all of the data it is here (it was too boring to put in a blog post). What data are available?