jgroup包中附带的一个监控集群中各服务器的信息交换状态、配置信息等的命令。
命令参数如下:
$ java org.jgroups.tests.Probe -help
Probe [-help] [-addr <addr>] [-bind_addr <addr>] [-port <port>] [-ttl <ttl>] [-t
imeout <timeout>] -query <query>
参数解析:
-
-addr: 根据多播地址查询集群服务器信息,即根据多播地址查询本多播地址下的集群服务器cache状态
-
-bind_addr: 根据服务器信息ip地址查询服务器cache状态
-
-port:多播端口查询
-
-ttl: the time-to-live (in hops): the greater the more hosts will you reach
-
-timeout: how long to wait (in seconds)
-
-query: a string that defines a subsystem to be listed, e.g. "jmx" or "props". Example: -query "jmx" -query "props"
几个常用命令参数及例子
1.查询所有集群节点()
[portal@oa-tydb1 cas_prod_domain]$ java -cp jboss-lib/jgroups-all.jar org.jgroups.tests.Probe -timeout 500 -addr 229.1.194.41
-- send probe on /224.0.75.75:7500
#1 (266 bytes):
member=10.212.194.29:1348 (CAS-Cache-Cluster)
local_addr=10.212.194.29:1348
cluster=CAS-Cache-Cluster
view =[10.212.194.27:33253|1] [10.212.194.27:33253, 10.212.194.29:1348]
version=2.6.5.GA, cvs="$Id: Version.java,v 1.59.2.10 2008/10/10 10:13:34 belaban Exp $"
注:1.view为集群中能够相互联系的各服务器ip及联系端口,如果与全部服务器已经列出说明服务器之间已经建立了连接,
以上显示说明此集群服务器中的两台服务器已经建立连接
2 .CAS-Cache-Cluster为集群配置中的ClusterName属性,如果次属性与配置文件中一直,说明此服务器监控的是
该集群的服务器
#2 (268 bytes):
member=10.212.194.27:33253 (CAS-Cache-Cluster)
local_addr=10.212.194.27:33253
cluster=CAS-Cache-Cluster
view=[10.212.194.27:33253|1] [10.212.194.27:33253, 10.212.194.29:1348]
version=2.6.5.GA, cvs="$Id: Version.java,v 1.59.2.10 2008/10/10 10:13:34 belaban Exp $"
2
[portal@oa-tydb1 cas_prod_domain]$ java -cp jboss-lib/jgroups-all.jar org.jgroups.tests.Probe -addr 229.1.194.41 -query jmx -query props
-- send probe on /229.1.194.41:7500
#1 (1031 bytes):
member=10.212.194.29:1348 (CAS-Cache-Cluster)
local_addr=10.212.194.29:1348
cluster=CAS-Cache-Cluster
jmx=UNICAST={unacked_msgs=10.212.194.27:33253: 0 msgs (0 to retransmit): []
, num_bytes_received=21246, num_unacked_msgs=0, num_acks_sent=531, num_msgs_sent=558, num_acks_received=558, num_xmit_requests_received=0, num_msgs_in_recv_windows=0, num_bytes_sent=4995, num_msgs_received=531}
UDP={num_bytes_received=1820526, num_msgs_sent=13895, num_bytes_sent=2203508, num_msgs_received=17031}
NAKACK={xmit_rsps_sent=0, msgs=10.212.194.27:33253: [3079 : 3134 (3134) (size=55, missing=0, highest stability=3079)]
10.212.194.29:1348: [3067 : 3118 (3118) (size=51, missing=0, highest stability=3067)]
, missing_msgs_received=0, xmit_reqs_received=0, xmit_reqs_sent=0, xmit_rsps_received=0}
channel={sent_msgs=0, sent_bytes=0, received_bytes=1804023, received_msgs=1609}
view=[10.212.194.27:33253|1] [10.212.194.27:33253, 10.212.194.29:1348]
version=2.6.5.GA, cvs="$Id: Version.java,v 1.59.2.10 2008/10/10 10:13:34 belaban Exp $"
注:此监控信息显示了各服务器之间的信息传递情况,传输字节数,丢失信息数等
#2 (1082 bytes):
member=10.212.194.27:33253 (CAS-Cache-Cluster)
local_addr=10.212.194.27:33253
cluster=CAS-Cache-Cluster
jmx=UNICAST={unacked_msgs=10.212.194.27:33253: 0 msgs (0 to retransmit): []
10.212.194.29:1348: 0 msgs (0 to retransmit): []
, num_bytes_received=4995, num_unacked_msgs=0, num_acks_sent=559, num_msgs_sent=532, num_acks_received=532, num_xmit_requests_received=0, num_msgs_in_recv_windows=0, num_bytes_sent=21246, num_msgs_received=559}
UDP={num_bytes_received=1804275, num_msgs_sent=13915, num_bytes_sent=2036378, num_msgs_received=26718}
NAKACK={xmit_rsps_sent=0, msgs=10.212.194.27:33253: [3079 : 3134 (3134) (size=55, missing=0, highest stability=3079)]
10.212.194.29:1348: [3067 : 3118 (3118) (size=51, missing=0, highest stability=3067)]
, missing_msgs_received=0, xmit_reqs_received=0, xmit_reqs_sent=0, xmit_rsps_received=0}
channel={sent_msgs=0, sent_bytes=0, received_bytes=1804275, received_msgs=1637}
view=[10.212.194.27:33253|1] [10.212.194.27:33253, 10.212.194.29:1348]
version=2.6.5.GA, cvs="$Id: Version.java,v 1.59.2.10 2008/10/10 10:13:34 belaban Exp $"