2013-05-26 36 views
0

我正在嘗試使用JMXMeter監控Cassandra活動連接;然而,按照文件當我運行以下,那麼它應該得到的結果如下使用JMXMeter監控Cassandra活動連接

$>info 
#mbean = org.apache.cassandra.db:type=Commitlog 
#class name = org.apache.cassandra.db.commitlog. 
PeriodicCommitLogExecutorService 
# attributes 
%0 - ActiveCount (int, r) 
%1 - CompletedTasks (long, r) 
%2 - PendingTasks (long, r) 
#there’s no operations 
#there’s no notifications 

但是我越來越只要你注意以下

$>info 
#mbean = org.apache.cassandra.db:type=Commitlog 
#class name = org.apache.cassandra.db.commitlog.CommitLog 
# attributes 
    %0 - ActiveSegmentNames (java.util.List, r) 
    %1 - ArchivingSegmentNames (java.util.List, r) 
    %2 - CompletedTasks (long, r) 
    %3 - PendingTasks (long, r) 
    %4 - TotalCommitlogSize (long, r) 
# operations 
    %0 - void recover(java.lang.String p1) 
#there's no notifications 

;我沒有得到ActiveCount()屬性,而不是我得到ActiveSegmentNames()和ArchivingSegmentNames()。我正在尋找屬性來監控acitve連接。

我正在使用apache-cassandra-1.2.3。

請幫忙。

感謝, 迪利普

回答

1

你可以只取列表的大小得到名稱列表的數量,但Commitlog段計數從未涉及的連接數。爲此,您需要向操作系統詢問您的Thrift(或本機協議)端口上的TCP連接。