* Reachability:
- Restrict peers requiring introducers from inbound tunnels, since it's slow and unreliable... and many of them advertise NTCP, which seems unlikely to work - Provide warning on summary bar if firewalled with inbound NTCP enabled * Stats: Remove the bw.[send,recv]Bps[1,15]s stats unless log level net.i2p.router.transport.FIFOBandwidthLimiter >= WARN at startup (you didn't get any data unless you set the log level anyway) * oldstats.jsp: Don't put 2 decimal places on integer event counts * Remove the Internals link from the menu bar * i2psnark: Extend startup delay from 1 to 3 minutes
This commit is contained in:
@ -84,7 +84,7 @@ public class SnarkManager implements Snark.CompleteListener {
|
||||
public boolean shouldUseOpenTrackers() {
|
||||
return Boolean.valueOf(_config.getProperty(PROP_USE_OPENTRACKERS, DEFAULT_USE_OPENTRACKERS)).booleanValue();
|
||||
}
|
||||
private int getStartupDelayMinutes() { return 1; }
|
||||
private int getStartupDelayMinutes() { return 3; }
|
||||
public File getDataDir() {
|
||||
String dir = _config.getProperty(PROP_DIR);
|
||||
if ( (dir == null) || (dir.trim().length() <= 0) )
|
||||
@ -508,7 +508,7 @@ public class SnarkManager implements Snark.CompleteListener {
|
||||
} else if (info.getPieces() <= 0) {
|
||||
return "No pieces in " + info.getName() + "? deleting it";
|
||||
} else if (info.getPieceLength(0) > 1*1024*1024) {
|
||||
return "Pieces are too large in " + info.getName() + " (" + info.getPieceLength(0)/1024 + "KB, deleting it";
|
||||
return "Pieces are too large in " + info.getName() + " (" + info.getPieceLength(0)/1024 + "KB), deleting it";
|
||||
} else if (info.getTotalLength() > 10*1024*1024*1024l) {
|
||||
System.out.println("torrent info: " + info.toString());
|
||||
List lengths = info.getLengths();
|
||||
|
@ -124,7 +124,10 @@ public class SummaryHelper {
|
||||
case CommSystemFacade.STATUS_DIFFERENT:
|
||||
return "ERR-SymmetricNAT";
|
||||
case CommSystemFacade.STATUS_REJECT_UNSOLICITED:
|
||||
return "Firewalled";
|
||||
if (_context.router().getRouterInfo().getTargetAddress("NTCP") != null)
|
||||
return "WARN-Firewalled with Inbound TCP Enabled";
|
||||
else
|
||||
return "Firewalled";
|
||||
case CommSystemFacade.STATUS_UNKNOWN: // fallthrough
|
||||
default:
|
||||
return "Testing";
|
||||
|
@ -34,8 +34,8 @@
|
||||
<a href="logs.jsp">Logs</a> |
|
||||
<a href="jobs.jsp">Jobs</a> |
|
||||
<a href="graphs.jsp">Graphs</a> |
|
||||
<a href="oldstats.jsp">Stats</a> |
|
||||
<a href="oldconsole.jsp">Internals</a>
|
||||
<a href="oldstats.jsp">Stats</a> <!-- |
|
||||
<a href="oldconsole.jsp">Internals</a> -->
|
||||
<% } %>
|
||||
<jsp:useBean class="net.i2p.router.web.NavHelper" id="navhelper" scope="request" />
|
||||
<jsp:setProperty name="navhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
||||
|
16
history.txt
16
history.txt
@ -1,3 +1,19 @@
|
||||
2008-05-07 zzz
|
||||
* Reachability:
|
||||
- Restrict peers requiring introducers from inbound tunnels,
|
||||
since it's slow and unreliable... and many of them advertise
|
||||
NTCP, which seems unlikely to work
|
||||
- Provide warning on summary bar if firewalled with inbound NTCP enabled
|
||||
* Stats: Remove the bw.[send,recv]Bps[1,15]s stats unless
|
||||
log level net.i2p.router.transport.FIFOBandwidthLimiter >= WARN
|
||||
at startup (you didn't get any data unless you set the log level anyway)
|
||||
* oldstats.jsp: Don't put 2 decimal places on integer event counts
|
||||
* Remove the Internals link from the menu bar
|
||||
* i2psnark: Extend startup delay from 1 to 3 minutes
|
||||
|
||||
2008-05-06 welterde
|
||||
* HTTP Proxy: Add i2jump.i2p jump service
|
||||
|
||||
2008-05-05 zzz
|
||||
* NetDb Stats: Cleanup of commented out stats
|
||||
* Outbound message:
|
||||
|
@ -17,7 +17,7 @@ import net.i2p.CoreVersion;
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.548 $ $Date: 2008-02-10 15:00:00 $";
|
||||
public final static String VERSION = "0.6.1.33";
|
||||
public final static long BUILD = 2;
|
||||
public final static long BUILD = 3;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
@ -29,8 +29,7 @@ public class StatsGenerator {
|
||||
|
||||
public void generateStatsPage(Writer out) throws IOException {
|
||||
StringBuffer buf = new StringBuffer(16*1024);
|
||||
buf.append("<h1>Router statistics</h1>");
|
||||
buf.append("<i><a href=\"/oldconsole.jsp\">console</a> | <a href=\"/oldstats.jsp\">stats</a></i><hr />");
|
||||
buf.append("<h1>Router statistics</h1><hr />");
|
||||
buf.append("<form action=\"/oldstats.jsp\">");
|
||||
buf.append("<select name=\"go\" onChange='location.href=this.value'>");
|
||||
out.write(buf.toString());
|
||||
@ -120,7 +119,7 @@ public class StatsGenerator {
|
||||
buf.append(num(curFreq.getStrictAverageEventsPerPeriod()));
|
||||
buf.append(" events (averaged ");
|
||||
buf.append(" using the lifetime of ");
|
||||
buf.append(num(curFreq.getEventCount()));
|
||||
buf.append(curFreq.getEventCount());
|
||||
buf.append(" events)");
|
||||
buf.append("<br />");
|
||||
}
|
||||
@ -169,7 +168,7 @@ public class StatsGenerator {
|
||||
buf.append(")");
|
||||
}
|
||||
buf.append(" <i>events per period:</i> ");
|
||||
buf.append(num(curRate.getLastEventCount()));
|
||||
buf.append(curRate.getLastEventCount());
|
||||
long numPeriods = curRate.getLifetimePeriods();
|
||||
if (numPeriods > 0) {
|
||||
double avgFrequency = curRate.getLifetimeEventCount() / (double)numPeriods;
|
||||
@ -177,7 +176,7 @@ public class StatsGenerator {
|
||||
buf.append(" (lifetime average: ");
|
||||
buf.append(num(avgFrequency));
|
||||
buf.append(", peak average: ");
|
||||
buf.append(num(curRate.getExtremeEventCount()));
|
||||
buf.append(curRate.getExtremeEventCount());
|
||||
buf.append(")");
|
||||
}
|
||||
if (curRate.getSummaryListener() != null) {
|
||||
@ -197,7 +196,7 @@ public class StatsGenerator {
|
||||
buf.append("<li><b>lifetime average value:</b> ");
|
||||
buf.append(num(curRate.getLifetimeAverageValue()));
|
||||
buf.append(" over ");
|
||||
buf.append(num(curRate.getLifetimeEventCount()));
|
||||
buf.append(curRate.getLifetimeEventCount());
|
||||
buf.append(" events<br /></li>");
|
||||
}
|
||||
}
|
||||
|
@ -426,7 +426,8 @@ public class ProfileOrganizer {
|
||||
|
||||
/**
|
||||
* Get the peers the transport layer thinks are unreachable, and
|
||||
* add in the peers with the SSU peer testing bug.
|
||||
* add in the peers with the SSU peer testing bug,
|
||||
* and peers requiring introducers.
|
||||
*
|
||||
*/
|
||||
public List selectPeersLocallyUnreachable() {
|
||||
@ -442,14 +443,28 @@ public class ProfileOrganizer {
|
||||
if (_context.commSystem().wasUnreachable(peer))
|
||||
l.add(peer);
|
||||
else {
|
||||
// blacklist <= 0.6.1.32 SSU-only peers, they don't know if they are unreachable,
|
||||
// and we may not know either if they contacted us first, so assume they are
|
||||
// Blacklist <= 0.6.1.32 SSU-only peers, they don't know if they are unreachable,
|
||||
// and we may not know either if they contacted us first, so assume they are.
|
||||
// Also blacklist all peers requiring SSU introducers, because either
|
||||
// a) it's slow; or
|
||||
// b) it doesn't work very often; or
|
||||
// c) in the event they are advertising NTCP, it probably won't work because
|
||||
// they probably don't have a TCP hole punched in their firewall either.
|
||||
RouterInfo info = _context.netDb().lookupRouterInfoLocally(peer);
|
||||
if (info != null) {
|
||||
String v = info.getOption("router.version");
|
||||
// this only works if there is no 0.6.1.34!
|
||||
if (v != null && (!v.equals("0.6.1.33")) &&
|
||||
v.startsWith("0.6.1.") && info.getTargetAddress("NTCP") == null)
|
||||
l.add(peer);
|
||||
else {
|
||||
RouterAddress ra = info.getTargetAddress("SSU");
|
||||
if (ra == null) continue;
|
||||
// This is the quick way of doing UDPAddress.getIntroducerCount() > 0
|
||||
Properties props = ra.getOptions();
|
||||
if (props != null && props.getProperty("ihost0") != null)
|
||||
l.add(peer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -66,10 +66,13 @@ public class FIFOBandwidthLimiter {
|
||||
_context.statManager().createRateStat("bwLimiter.pendingInboundRequests", "How many inbound requests are ahead of the current one (ignoring ones with 0)?", "BandwidthLimiter", new long[] { 60*1000l, 5*60*1000l, 10*60*1000l, 60*60*1000l });
|
||||
_context.statManager().createRateStat("bwLimiter.outboundDelayedTime", "How long it takes to honor an outbound request (ignoring ones with that go instantly)?", "BandwidthLimiter", new long[] { 60*1000l, 5*60*1000l, 10*60*1000l, 60*60*1000l });
|
||||
_context.statManager().createRateStat("bwLimiter.inboundDelayedTime", "How long it takes to honor an inbound request (ignoring ones with that go instantly)?", "BandwidthLimiter", new long[] { 60*1000l, 5*60*1000l, 10*60*1000l, 60*60*1000l });
|
||||
_context.statManager().createRateStat("bw.sendBps1s", "How fast we are transmitting for the 1s quantization (period is the number of bytes transmitted)?", "Bandwidth", new long[] { 60*1000l, 10*60*1000l });
|
||||
_context.statManager().createRateStat("bw.recvBps1s", "How fast we are receiving for the 1s quantization (period is the number of bytes transmitted)?", "Bandwidth", new long[] { 60*1000l, 10*60*1000l });
|
||||
_context.statManager().createRateStat("bw.sendBps15s", "How fast we are transmitting for the 15s quantization (period is the number of bytes transmitted)?", "Bandwidth", new long[] { 60*1000l, 10*60*1000l });
|
||||
_context.statManager().createRateStat("bw.recvBps15s", "How fast we are receiving for the 15s quantization (period is the number of bytes transmitted)?", "Bandwidth", new long[] { 60*1000l, 10*60*1000l });
|
||||
if (_log.shouldLog(Log.WARN)) {
|
||||
// If you want to see these you better have the logging set at startup!
|
||||
_context.statManager().createRateStat("bw.sendBps1s", "How fast we are transmitting for the 1s quantization (period is the number of bytes transmitted)?", "Bandwidth", new long[] { 60*1000l, 10*60*1000l });
|
||||
_context.statManager().createRateStat("bw.recvBps1s", "How fast we are receiving for the 1s quantization (period is the number of bytes transmitted)?", "Bandwidth", new long[] { 60*1000l, 10*60*1000l });
|
||||
_context.statManager().createRateStat("bw.sendBps15s", "How fast we are transmitting for the 15s quantization (period is the number of bytes transmitted)?", "Bandwidth", new long[] { 60*1000l, 10*60*1000l });
|
||||
_context.statManager().createRateStat("bw.recvBps15s", "How fast we are receiving for the 15s quantization (period is the number of bytes transmitted)?", "Bandwidth", new long[] { 60*1000l, 10*60*1000l });
|
||||
}
|
||||
_pendingInboundRequests = new ArrayList(16);
|
||||
_pendingOutboundRequests = new ArrayList(16);
|
||||
_lastTotalSent = _totalAllocatedOutboundBytes;
|
||||
|
Reference in New Issue
Block a user