Configure the broker’s metrics generation capability:
Confirm imq.metrics.enabled=true
Generation of metrics for logging is turned on by default.
Set the metrics generation interval to a convenient number of seconds.
imq.metrics.interval=interval
This value can be set in the config.properties file or using the -metrics interval command line option when starting up the broker.
Confirm that the Logger gathers metrics information:
imq.log.level=INFO |
This is the default value. This value can be set in the config.properties file or using the -loglevel level command line option when starting up the broker.
Confirm that the Logger is set to write metrics information to the log file:
imq.log.file.output=INFO |
This is the default value. It can be set in the config.properties file.
Start up the broker.
The following shows sample broker metrics output to the log file:
[21/Jul/2004:11:21:18 PDT] Connections: 0 JVM Heap: 8323072 bytes (7226576 free) Threads: 0 (14-1010) In: 0 msgs (0bytes) 0 pkts (0 bytes) Out: 0 msgs (0bytes) 0 pkts (0 bytes) Rate In: 0 msgs/sec (0 bytes/sec) 0 pkts/sec (0 bytes/sec) Rate Out: 0 msgs/sec (0 bytes/sec) 0 pkts/sec (0 bytes/sec) |
For reference information about metrics data, see Chapter 20, Metrics Information Reference