# This Perl script open connection and call domains
# $jar stands for path of jmxterm jar file
open JMX, "| java -jar jmxterm-1.0-alpha-4-uber.jar -n"; // jmx jar file
#print JMX "help \n";
my $host = "127.0.0.1"; // hostname
my $port = 7199; //jmx port number
print JMX "open $host:$port\n";
#print JMX "domains\n";
print JMX "domain org.apache.cassandra.request\n";
print JMX "bean type=ReadRepairStage\n";
print JMX "get CompletedTasks\n";
print JMX "close\n";
close JMX;
現在、私は出力を取得しておりCompletedTasks = 1234
、必要1234
です。