Update of /cvsroot/freenet/freenet/src/freenet/node
In directory sc8-pr-cvs1:/tmp/cvs-serv25229/src/freenet/node

Modified Files:
        Main.java Node.java 
Log Message:
don't show RT histogram if not using CPAlgoRT. Fix caption on successful inserts page. 
Implement log rotation with optional compression using external native gzip. Logging. 
New diags insertRoutingSuccessRatio, insertNonRoutingSuccessRatio, 
insertFailRoutingNonRoutingRatio. Improved toString() on some objects. Ignore 
QueryRejected.hopsToLive - use hopsToLive/2. Give StoreData a much longer timeout when 
we go to AWSD from an insert.


Index: Main.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/Main.java,v
retrieving revision 1.254
retrieving revision 1.255
diff -u -r1.254 -r1.255
--- Main.java   30 Aug 2003 23:16:51 -0000      1.254
+++ Main.java   2 Sep 2003 17:05:21 -0000       1.255
@@ -274,11 +274,19 @@
                        
                        FileLoggerHook.setMaxListLength(logMaxLinesCached);
                        FileLoggerHook.setMaxListBytes(logMaxBytesCached);
+                       
FileLoggerHook.setUseNativeGzip(params.getBoolean("logRotateUseNativeGzip"));
+                       String logInterval = params.getString("logRotateInterval");
+                       try {
+                               FileLoggerHook.setInterval(logInterval);
+                       } catch (IllegalArgumentException e) {
+                               System.err.println("Invalid interval "+logInterval);
+                       }
                        
             try {
                                boolean dontCheck = (sw.getParam("export") != null);
                 if (!fname.equalsIgnoreCase("NO")) {
-                    loggerHook = new FileLoggerHook(fname, 
+                    loggerHook = new FileLoggerHook(params.getBoolean("logRotate"),
+                                                                                      
                 fname, 
                                                                                       
                 logFormat, 
                                                                                       
                 logDate,
                                                                                       
                 thresh,
@@ -1988,6 +1996,16 @@
                                                   "The number of requests started, 
and the "+
                                                   "number that successfully returned 
data.", 
                                                   messages);
+               d.registerBinomial("insertRoutingSuccessRatio", d.MINUTE,
+                                                  "The number of insert requests 
routed, and "+
+                                                  "the number that succeeded, both 
excluding "+
+                                                  "non-routing failures.", messages);
+               d.registerBinomial("insertNonRoutingSuccessRatio", d.MINUTE,
+                                                  "Insert requests that succeeded or 
failed, "+
+                                                  "not due to routing.", messages);
+               d.registerBinomial("insertFailRoutingNonRoutingRatio", d.MINUTE,
+                                                  "Insert request failures: how many 
failed, and "+
+                                                  "how many failed due to routing.", 
messages);
                d.registerBinomial("requestFailureRoutingOrNotRatio", d.MINUTE,
                                                   "The number of failing requests, 
and the "+
                                                   "number that failed due to 
routing.",

Index: Node.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/Node.java,v
retrieving revision 1.206
retrieving revision 1.207
diff -u -r1.206 -r1.207
--- Node.java   30 Aug 2003 23:16:51 -0000      1.206
+++ Node.java   2 Sep 2003 17:05:21 -0000       1.207
@@ -150,6 +150,9 @@
         config.addOption("logDate",   1, "",            1253);  // locale default
        config.addOption("logMaxLinesCached",1, 10000,  1254);
        config.addOption("logMaxBytesCached",1, "10M",  1255);
+       config.addOption("logRotate", 1, false,         1256);
+       config.addOption("logRotateUseNativeGzip",1,false,1257);
+       config.addOption("logRotateInterval", 1, "hour", 1258);
         
         // diagnostics options
         config.addOption("diagnosticsPath", 1, "stats", 501);
@@ -741,6 +744,21 @@
        config.setExpert ("logMaxBytesCached", true);
        config.argDesc   ("logMaxBytesCached", "<bytes - can use kKmMgGg 
multipliers>");
        config.shortDesc ("logMaxBytesCached", "Maximum number of logged bytes to 
cache, anything above this will be discarded to prevent deadlocks and blocking");
+       
+       // logRotate
+       config.setExpert ("logRotate", true);
+       config.argDesc   ("logRotate", "<true|false>");
+       config.shortDesc ("logRotate", "Whether to rotate the log files. This is best 
done inside freenet because restarting Fred is slow and loses open connections.");
+       
+       // logRotateUseNativeGzip
+       config.setExpert ("logRotateUseNativeGzip", true);
+       config.argDesc   ("logRotateUseNativeGzip", "<true|false>");
+       config.shortDesc ("logRotateUseNativeGzip", "Whether to launch a native gzip 
to compress the old log files.");
+       
+       // logRotateInterval
+       config.setExpert("logRotateInterval", true);
+       config.argDesc  ("logRotateInterval", "<minute|hour|week|month|year>");
+       config.shortDesc("logRotateInterval", "Time interval for logfile rotation.");
        
         // seedFile
         config.argDesc   ("seedFile", "<file>");

_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to