Files
i2p.i2p/apps/routerconsole/jsp/debug.jsp
zzz 796a231f54 NetDB:
- Move net.i2p.kademlia package from i2psnark to core, and convert
    netdb to use it.
  - Delete old implementation in netdb
  - Fixups in netdb for generics
  - Add debug output to /debug

  This is the next step in the development plan, in which we previously:
    - Copied the code from netdb to the i2p.zzz.kademlia branch, fixed it,
      and made it generic for hash size (June 2012);
    - Moved it from the i2p.zzz.kademlia branch to the i2p.i2p.zzz.dhtsnark
      branch, and implemented KRPC with it (June 2012);
    - Propped it from i2p.i2p.zzz.dhtsnark to trunk for 0.9.2 (July-Sept. 2012);
    - Proved it out in 0.9.2 - 0.9.9 (Oct. 2012 - Nov. 2013)

  The plan was to maintain the KBucketSet public methods throughout the development
  so we could drop the new version back into netdb, so here we drop it in.

  Setting of K=16, B=3 is just an initial guess, to be reviewed.
  This moves about 18 KB from i2psnark.jar to i2p.jar and removes about 12 KB from router.jar.
  Unit test fixup: todo.
2013-11-24 16:38:51 +00:00

56 lines
1.7 KiB
Plaintext

<%@page contentType="text/html"%>
<%@page trimDirectiveWhitespaces="true"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
/*
* Do not tag this file for translation.
*/
%>
<html><head><title>I2P Router Console - Debug</title>
<%@include file="css.jsi" %>
<script src="/js/ajax.js" type="text/javascript"></script>
<%@include file="summaryajax.jsi" %>
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<h1>Router Debug</h1>
<div class="main" id="main">
<%
/*
* Quick and easy place to put debugging stuff
*/
net.i2p.router.RouterContext ctx = (net.i2p.router.RouterContext) net.i2p.I2PAppContext.getGlobalContext();
/*
* Print out the status for the NetDB
*/
out.print("<h2>Router DHT</h2>");
ctx.netDb().renderStatusHTML(out);
/*
* Print out the status for the UpdateManager
*/
ctx.updateManager().renderStatusHTML(out);
/*
* Print out the status for the AppManager
*/
ctx.clientAppManager().renderStatusHTML(out);
/*
* Print out the status for all the SessionKeyManagers
*/
out.print("<h2>Router SKM</h2>");
ctx.sessionKeyManager().renderStatusHTML(out);
java.util.Set<net.i2p.data.Destination> clients = ctx.clientManager().listClients();
for (net.i2p.data.Destination dest : clients) {
net.i2p.data.Hash h = dest.calculateHash();
net.i2p.crypto.SessionKeyManager skm = ctx.clientManager().getClientSessionKeyManager(h);
if (skm != null) {
out.print("<h2>" + h.toBase64().substring(0,6) + " SKM</h2>");
skm.renderStatusHTML(out);
}
}
%>
</div></body></html>