]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
log bytes written with kill -USR1 too
authorRoger Dingledine <arma@torproject.org>
Tue, 7 Dec 2004 16:50:47 +0000 (16:50 +0000)
committerRoger Dingledine <arma@torproject.org>
Tue, 7 Dec 2004 16:50:47 +0000 (16:50 +0000)
svn:r3112

src/or/main.c

index d981251c3c1a28786fc106ffb8786e8567614ac4..5404a9a0e4c7def401175380fb1d6d1f16e94141 100644 (file)
@@ -997,12 +997,18 @@ static void dumpstats(int severity) {
            100*(((double)stats_n_data_bytes_received) /
                 (stats_n_data_cells_received*RELAY_PAYLOAD_SIZE)) );
 
-  if (stats_n_seconds_uptime)
+  if (stats_n_seconds_uptime) {
     log(severity,
-        "Average bandwidth used: "U64_FORMAT"/%ld = %d bytes/sec",
+        "Average bandwidth: "U64_FORMAT"/%ld = %d bytes/sec reading",
         U64_PRINTF_ARG(stats_n_bytes_read),
         stats_n_seconds_uptime,
         (int) (stats_n_bytes_read/stats_n_seconds_uptime));
+    log(severity,
+        "Average bandwidth: "U64_FORMAT"/%ld = %d bytes/sec writing",
+        U64_PRINTF_ARG(stats_n_bytes_written),
+        stats_n_seconds_uptime,
+        (int) (stats_n_bytes_written/stats_n_seconds_uptime));
+  }
 
   rep_hist_dump_stats(now,severity);
   rend_service_dump_stats(severity);