diff --git a/router/java/src/net/i2p/router/tasks/RouterWatchdog.java b/router/java/src/net/i2p/router/tasks/RouterWatchdog.java index cde59db125bbf18ade57588cecfa37b341183399..b65a298af5a9ae0652c3c88f74a5586b30d4eba4 100644 --- a/router/java/src/net/i2p/router/tasks/RouterWatchdog.java +++ b/router/java/src/net/i2p/router/tasks/RouterWatchdog.java @@ -76,37 +76,28 @@ public class RouterWatchdog implements Runnable { private void dumpStatus() { if (_log.shouldLog(Log.ERROR)) { - /* - Job cur = _context.jobQueue().getLastJob(); - if (cur != null) - _log.error("Most recent job: " + cur); - _log.error("Last job began: " - + DataHelper.formatDuration(_context.clock().now()-_context.jobQueue().getLastJobBegin()) - + " ago"); - _log.error("Last job ended: " - + DataHelper.formatDuration(_context.clock().now()-_context.jobQueue().getLastJobEnd()) - + " ago"); - */ - _log.error("Ready and waiting jobs: " + _context.jobQueue().getReadyCount()); - _log.error("Job lag: " + _context.jobQueue().getMaxLag()); - _log.error("Participating tunnel count: " + _context.tunnelManager().getParticipatingCount()); - RateStat rs = _context.statManager().getRate("transport.sendProcessingTime"); Rate r = null; if (rs != null) r = rs.getRate(60*1000); double processTime = (r != null ? r.getAverageValue() : 0); - _log.error("1 minute send processing time: " + DataHelper.formatDuration((long)processTime)); rs = _context.statManager().getRate("bw.sendBps"); r = null; if (rs != null) r = rs.getRate(60*1000); double bps = (r != null ? r.getAverageValue() : 0); - _log.error("Outbound send rate: " + DataHelper.formatSize((long)bps) + "Bps"); long max = Runtime.getRuntime().maxMemory(); long used = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); - _log.error("Memory: " + DataHelper.formatSize(used) + "B / " + DataHelper.formatSize(max) + 'B'); + _log.error("Watchdog status\nComm system: " + _context.commSystem().getStatus() + + "\nPeers: " + _context.commSystem().countActivePeers() + + "\nReady and waiting jobs: " + _context.jobQueue().getReadyCount() + + "\nLag: " + DataHelper.formatDuration(_context.jobQueue().getMaxLag()) + + "\nPart. tunnels: " + _context.tunnelManager().getParticipatingCount() + + "\nSend processing time: " + DataHelper.formatDuration((long)processTime) + + "\nSend rate: " + DataHelper.formatSize((long)bps) + "Bps" + + "\nMemory: " + DataHelper.formatSize(used) + "B / " + DataHelper.formatSize(max) + 'B'); + if (_consecutiveErrors == 1) { _log.log(Log.CRIT, "Router appears hung, or there is severe network congestion. Watchdog starts barking!"); _context.router().eventLog().addEvent(EventLog.WATCHDOG);