--- dnstop.c 2005-04-05 22:43:53.000000000 +0200 +++ dnstop_avg.c 2005-06-16 15:08:59.842334312 +0200 @@ -1003,7 +1003,7 @@ } void -report(void) +report(time_t n) { move(0, 0); print_func("%d new queries, %d total queries", @@ -1011,6 +1011,9 @@ clrtoeol(); if (last_ts.tv_sec) { time_t t = (time_t) last_ts.tv_sec; + move(0, 35); + if (t!=n) + print_func("avg [q/s]: %d", query_count_total/((int)t-(int)n)); move(0, 50); print_func("%s", ctime(&t)); } @@ -1265,6 +1268,7 @@ } if (interactive) { init_curses(); + time_t n = time(&n); while (0 == Quit) { if (readfile_state < 2) if (readfile_state || pcap_select(pcap, 1, 0)) @@ -1276,7 +1280,7 @@ } keyboard(); cron_pre(); - report(); + report(n); cron_post(); } endwin(); /* klin, Thu Nov 28 08:56:51 2002 */