X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=innduct.git;a=blobdiff_plain;f=duct.c;h=a7c487228fdae5a57500bf9266f75e372d0345d9;hp=489fb92ee203c4c2fc740d83d7b52a1da50d4874;hb=12629a26c20d3c5c00b4f71f5c73c304031a303b;hpb=bd52671fe8ab7e1fcef0e82a91d6bf4d5d6130eb diff --git a/duct.c b/duct.c index 489fb92..a7c4872 100644 --- a/duct.c +++ b/duct.c @@ -44,6 +44,7 @@ pid_t self_pid; int *lowvol_perperiod; int lowvol_circptr; int lowvol_total; /* does not include current period */ +int until_stats_log=1; /*---------- configuration option variables ----------*/ /* when changing defaults, remember to update the manpage */ @@ -77,6 +78,7 @@ int backlog_spontrescan_periods=300; int spontaneous_flush_periods=100000; int max_separated_periods=2000; int need_activity_periods=1000; +int stats_log_periods=2500; int lowvol_thresh=3; int lowvol_periods=1000; @@ -169,6 +171,9 @@ void period(void) { free(dipf_flushing); free(dipf_backlog); + if (until_stats_log) until_stats_log--; + else showstats(); + if (until_connect) until_connect--; inputfile_queue_check_expired(backlog_input_file); @@ -378,6 +383,7 @@ static const Option innduct_options[]= { {0,"max-flush-interval", "PERIOD", &spontaneous_flush_periods,op_seconds }, {0,"flush-finish-timeout", "PERIOD", &max_separated_periods, op_seconds }, {0,"idle-timeout", "PERIOD", &need_activity_periods, op_seconds }, +{0,"stats-log-interval", "PERIOD", &stats_log_periods, op_seconds }, {0,"low-volume-thresh", "PERIOD", &lowvol_thresh, op_integer }, {0,"low-volume-window", "PERIOD", &lowvol_periods, op_seconds },