THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
No Format |
---|
$>open 10167 $>info -b kafka.server:name=TotalFetchRequestsPerSec,topic=topicG,type=BrokerTopicMetrics #mbean = kafka.server:name=TotalFetchRequestsPerSec,topic=topicG,type=BrokerTopicMetrics #class name = com.yammer.metrics.reporting.JmxReporter$Meter # attributes %0 - Count (long, r) %1 - EventType (java.lang.String, r) %2 - FifteenMinuteRate (double, r) %3 - FiveMinuteRate (double, r) %4 - MeanRate (double, r) %5 - OneMinuteRate (double, r) %6 - RateUnit (java.util.concurrent.TimeUnit, r) # operations %0 - javax.management.ObjectName objectName() #there's no notifications $>get -s -b kafka.server:name=TotalFetchRequestsPerSec,topic=topicG,type=BrokerTopicMetrics OneMinuteRate #mbean = kafka.server:name=TotalFetchRequestsPerSec,topic=topicG,type=BrokerTopicMetrics: 7.960856160430041 |
(You can use the domain command to set the domain to avoid having to type out the fully qualified object name.)
Non-interactive (batch) mode
Same as above example, but non-interactive.
No Format |
---|
$ cat jmxcommands
open 10167
get -s -b kafka.server:name=TotalFetchRequestsPerSec,topic=topicG,type=BrokerTopicMetrics OneMinuteRate
close
$ java -jar jmxterm-1.0-alpha-4-uber.jar -v silent -n < jmxcommands
7.973832278363945 |
If you have a JMX URI at hand, you can also poke remote mbeans:
No Format |
---|
$ java -jar jmxterm-1.0-alpha-4-uber.jar -l <JMX URI> -v silent -n < jmxcommands |
No Format |
echo |