innfeed busy logging timer stats

Florian Schlichting fschlich at CIS.FU-Berlin.DE
Wed Jun 22 20:59:50 UTC 2011


Hi,

working on a development server, I noticed innfeed printing lots of
useless lines to news.notice:

Jun 22 00:12:05 Lucia innfeed[18100]: ME time 1000 idle 1000(1) blstats 0(1) stsfile 0(0) newart 0(0) readart 0(0) prepart 0(0) read 0(1) write 0(0) 
Jun 22 00:12:05 Lucia innfeed[18100]: ME time 0 idle 0(1) blstats 0(1) stsfile 0(0) newart 0(0) readart 0(0) prepart 0(0) read 0(0) write 0(0) 
Jun 22 00:12:05 Lucia innfeed[18100]: ME time 0 idle 0(1) blstats 0(1) stsfile 0(0) newart 0(2) readart 0(0) prepart 0(0) read 0(1) write 0(0) 
Jun 22 00:12:05 Lucia innfeed[18100]: ME time 0 idle 0(1) blstats 0(1) stsfile 0(0) newart 0(0) readart 0(0) prepart 0(0) read 0(1) write 0(1) 
Jun 22 00:12:05 Lucia innfeed[18100]: ME time 0 idle 0(1) blstats 0(1) stsfile 0(0) newart 0(0) readart 0(0) prepart 0(0) read 0(0) write 0(1) 
Jun 22 00:12:06 Lucia innfeed[18100]: ME time 1000 idle 1000(1) blstats 0(1) stsfile 0(0) newart 0(0) readart 0(0) prepart 0(0) read 0(1) write 0(0) 
Jun 22 00:12:06 Lucia innfeed[18100]: ME time 0 idle 0(1) blstats 0(1) stsfile 0(0) newart 0(0) readart 0(0) prepart 0(0) read 0(0) write 0(0) 

The reason seems to be that TMRnow() doesn't return the current time, as
I think innfeed assumes, but the readily usable number of milliseconds
since the last call to TMRsummary() or TMRinit(). Patch below.

Florian

---
 innfeed/endpoint.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/innfeed/endpoint.c b/innfeed/endpoint.c
index 56ae3c4..8455f0a 100644
--- a/innfeed/endpoint.c
+++ b/innfeed/endpoint.c
@@ -633,17 +633,9 @@ void Run (void)
       TMRstop(TMR_IDLE);
 
       timePasses () ;
-      if (innconf->timer != 0)
-        {
-	  unsigned long now = TMRnow () ;
-	  if (last_summary == 0 
-	      || (now - last_summary) > (innconf->timer * 1000))
-	    {
-	      TMRsummary ("ME", timer_name) ;
-	      last_summary = now;
-	    }
-	}
-      
+      if (innconf->timer != 0 && TMRnow() > innconf->timer * 1000)
+          TMRsummary ("ME", timer_name);
+
       if (sval == 0 && twait == NULL)
         die ("No fd's ready and no timeouts") ;
       else if (sval < 0 && errno == EINTR)
-- 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5557 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/inn-workers/attachments/20110622/bdfe8f7e/attachment.bin>


More information about the inn-workers mailing list