transferred bytes per port to disk every 24 hours. To enable this,
run configure with the --enable-exit-stats option, and set
"ExitPortStatistics 1" in your torrc.
+ - Relays write statistics on how long cells spend in their circuit
+ queues to disk every 24 hours. To enable this, run configure with
+ the --enable-buffer-stats option, and set "CellStatistics 1" in your
+ torrc.
+ - Entry nodes can write statistics on the rough number and origins of
+ connecting clients to disk every 24 hours. To enable this, run
+ configure with the --enable-entry-stats option, and set
+ "EntryStatistics 1" in your torrc.
o Minor bugfixes
- Hidden service clients didn't use a cached service descriptor that
AC_DEFINE(ENABLE_GEOIP_STATS, 1, [Defined if we try to collect per-country statistics])
fi
+AC_ARG_ENABLE(buffer-stats,
+ AS_HELP_STRING(--enable-buffer-stats, enable code for relays to collect buffer statistics))
+
+if test "$enable_buffer_stats" = "yes"; then
+ AC_DEFINE(ENABLE_BUFFER_STATS, 1, [Defined if we try to collect buffer statistics])
++fi
++
+ AC_ARG_ENABLE(entry-stats,
+ AS_HELP_STRING(--enable-entry-stats, enable code for entry guards to collect per-country statistics))
+
+ if test "$enable_entry_stats" = "yes"; then
+ AC_DEFINE(ENABLE_ENTRY_STATS, 1, [Defined if we try to collect per-country statistics])
fi
AC_ARG_ENABLE(gcc-warnings,
log_warn(LD_CONFIG, "ExitPortStatistics enabled, but Tor was built "
"without port statistics support.");
#endif
++
+#ifdef ENABLE_BUFFER_STATS
+ if (options->CellStatistics)
+ log_notice(LD_CONFIG, "Configured to measure cell statistics. Look "
+ "for the buffer-stats file that will first be written to "
+ "the data directory in 24 hours from now.");
+#else
+ if (options->CellStatistics)
+ log_warn(LD_CONFIG, "CellStatistics enabled, but Tor was built "
+ "without cell statistics support.");
+#endif
++
+ #ifdef ENABLE_ENTRY_STATS
+ if (options->EntryStatistics) {
+ if (should_record_bridge_info(options)) {
+ /* Don't allow measuring statistics on entry guards when configured
+ * as bridge. */
+ log_warn(LD_CONFIG, "Bridges cannot be configured to measure "
+ "additional GeoIP statistics as entry guards.");
+ return -1;
+ } else
+ log_notice(LD_CONFIG, "Configured to measure entry node "
+ "statistics. Look for the entry-stats file that will "
+ "first be written to the data directory in 24 hours "
+ "from now.");
+ }
+ #else
+ if (options->EntryStatistics)
+ log_warn(LD_CONFIG, "EntryStatistics enabled, but Tor was built "
+ "without entry node statistics support.");
+ #endif
/* Check if we need to parse and add the EntryNodes config option. */
if (options->EntryNodes &&
(!old_options ||
/** If true, the user wants us to collect statistics on port usage. */
int ExitPortStatistics;
+ /** If true, the user wants us to collect cell statistics. */
+ int CellStatistics;
+
+ /** If true, the user wants us to collect statistics as entry node. */
+ int EntryStatistics;
+
/** If true, do not believe anybody who tells us that a domain resolves
* to an internal address, or that an internal address has a PTR mapping.
* Helps avoid some cross-site attacks. */