DHTTransport transport = dht.getTransport();
DHTTransportStats t_stats = transport.getStats();
DHTDBStats d_stats = dht.getDataBase().getStats();
DHTControlStats c_stats = dht.getControl().getStats();
DHTRouterStats r_stats = dht.getRouter().getStats();
long[] rs = r_stats.getStats();
DHTNetworkPosition[] nps = transport.getLocalContact().getNetworkPositions();
String np_str = "";
for (int j=0;j<nps.length;j++){
np_str += (j==0?"":",") + nps[j];
}
ci.out.println( "DHT:ip=" + transport.getLocalContact().getAddress() +
",net=" + transport.getNetwork() +
",prot=V" + transport.getProtocolVersion() +
",np=" + np_str);
ci.out.println(
"Router" +
":nodes=" + rs[DHTRouterStats.ST_NODES] +
",leaves=" + rs[DHTRouterStats.ST_LEAVES] +
",contacts=" + rs[DHTRouterStats.ST_CONTACTS] +
",replacement=" + rs[DHTRouterStats.ST_REPLACEMENTS] +
",live=" + rs[DHTRouterStats.ST_CONTACTS_LIVE] +
",unknown=" + rs[DHTRouterStats.ST_CONTACTS_UNKNOWN] +
",failing=" + rs[DHTRouterStats.ST_CONTACTS_DEAD]);
ci.out.println(
"Transport" +
":" + t_stats.getString());
int[] dbv_details = d_stats.getValueDetails();
ci.out.println(
"Control:dht=" + c_stats.getEstimatedDHTSize() +
", Database:keys=" + d_stats.getKeyCount() +
",vals=" + dbv_details[DHTDBStats.VD_VALUE_COUNT]+
",loc=" + dbv_details[DHTDBStats.VD_LOCAL_SIZE]+
",dir=" + dbv_details[DHTDBStats.VD_DIRECT_SIZE]+
",ind=" + dbv_details[DHTDBStats.VD_INDIRECT_SIZE]+