INN commit: trunk (5 files)

INN Commit rra at isc.org
Fri Mar 19 19:50:07 UTC 2010


    Date: Friday, March 19, 2010 @ 12:50:05
  Author: iulius
Revision: 9016

Change how innfeed logs its article counts.  A checkpoint is added
just before a connection is closed.  Checkpoints contain values
accumulated since the last checkpoint.
This way, innreport can rely on checkpoints only, so as to produce
more accurate stats.

See also commit [9002] for innd.

close #7

Modified:
  trunk/doc/pod/news.pod
  trunk/innfeed/connection.c
  trunk/innfeed/host.c
  trunk/scripts/innreport.in
  trunk/scripts/innreport_inn.pm

--------------------------+
 doc/pod/news.pod         |   10 ++
 innfeed/connection.c     |  107 +++++++++++++++++---------
 innfeed/host.c           |  185 ++++++++++++++++++++++++++++++++++++---------
 scripts/innreport.in     |    2 
 scripts/innreport_inn.pm |   22 +++--
 5 files changed, 247 insertions(+), 79 deletions(-)

Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod	2010-03-16 19:53:26 UTC (rev 9015)
+++ doc/pod/news.pod	2010-03-19 19:50:05 UTC (rev 9016)
@@ -93,6 +93,16 @@
 
 =head1 Changes in 2.5.2
 
+The way checkpoints are handled by B<innreport> for B<innd> and B<innfeed>
+has totally changed, so as to provide more accurate daily statistics.
+The first Usenet report after an upgrade to S<INN 2.5.2> will probably
+contain untrustful statistics for incoming and outgoing articles (because
+the beginning of the log files that will be used was generated by a previous
+version of INN).
+
+Note that a new version of F<innreport.conf> is shipped with S<INN 2.5.2>.
+Changes are minor and not mandatory for the upgrade.
+
 =over 2
 
 =item *

Modified: innfeed/connection.c
===================================================================
--- innfeed/connection.c	2010-03-16 19:53:26 UTC (rev 9015)
+++ innfeed/connection.c	2010-03-19 19:50:05 UTC (rev 9016)
@@ -179,30 +179,39 @@
                                    streaming mode (rather than just sending
                                    TAKETHIS commands) */
 
-    time_t timeCon ;            /* the time the connect happened (including
-                                   the MODE STREAM command). */
+    time_t timeCon;             /* the time the connect happened (including
+                                   the MODE STREAM command) */
+    time_t timeCon_checkpoint;
 
     /*
      * STATISTICS
      */
-    unsigned int artsTaken ;           /* the number of articles INN gave this cxn */
-    unsigned int checksIssued ;        /* the number of CHECKS/IHAVES we
-                                   sent. Note that if we're running in
-                                   no-CHECK mode, then we add in the
-                                   TAKETHIS commands too */
-    unsigned int checksRefused ;       /* the number of response 435/438 */
-    unsigned int takesRejected ;       /* the number of response 437/439 recevied */
-    unsigned int takesOkayed ;         /* the number of response 235/239 received */
+    unsigned int artsTaken;           /* the number of articles INN gave this cxn */
 
-    double takesSizeRejected ;
-    double takesSizeOkayed ;
+    unsigned int checksIssued;        /* the number of CHECKs/IHAVEs we
+                                          sent.  Note that if we're running in
+                                          no-CHECK mode, then we add in the
+                                          TAKETHIS commands too */
+    unsigned int checksIssued_checkpoint;
 
+    unsigned int checksRefused;       /* the number of response 435/438 */
+    unsigned int checksRefused_checkpoint;
+    unsigned int takesRejected;       /* the number of response 437/439 received */
+    unsigned int takesRejected_checkpoint;
+    unsigned int takesOkayed;         /* the number of response 235/239 received */
+    unsigned int takesOkayed_checkpoint;
+
+    double takesSizeRejected;
+    double takesSizeRejected_checkpoint;
+    double takesSizeOkayed;
+    double takesSizeOkayed_checkpoint;
+
     double onThreshold ;        /* for no-CHECK mode */
     double offThreshold ;       /* for no-CHECK mode */
     double filterValue ;        /* current value of IIR filter */
     double lowPassFilter ;      /* time constant for IIR filter */
 
-    Connection next ;           /* for global list. */
+    Connection next ;           /* for global list */
 };
 
 static Connection gCxnList = NULL ;
@@ -971,8 +980,8 @@
 
 
 /*
- * generate a log message for activity. Usually called by the Connection's
- * owner
+ * Generate a log message for activity.  Usually called by the Connection's
+ * owner.
  */
 void cxnLogStats (Connection cxn, bool final)
 {
@@ -981,7 +990,7 @@
 
   ASSERT (cxn != NULL) ;
 
-  /* only log stats when in one of these three states. */
+  /* Only log stats when in one of these three states. */
   switch (cxn->state)
     {
       case cxnFeedingS:
@@ -995,25 +1004,45 @@
 
   peerName = hostPeerName (cxn->myHost) ;
 
-  notice ("%s:%d %s seconds %ld offered %d accepted %d refused %d"
-          " rejected %d accsize %.0f rejsize %.0f", peerName, cxn->ident,
-          (final ? "final" : "checkpoint"), (long) (now - cxn->timeCon),
-          cxn->checksIssued, cxn->takesOkayed, cxn->checksRefused,
-          cxn->takesRejected, cxn->takesSizeOkayed, cxn->takesSizeRejected) ;
+  /* Log a checkpoint in any case. */
+  notice("%s:%d checkpoint seconds %ld offered %d accepted %d refused %d"
+         " rejected %d accsize %.0f rejsize %.0f",
+         peerName, cxn->ident,
+         (long) (now - cxn->timeCon_checkpoint),
+         cxn->checksIssued - cxn->checksIssued_checkpoint,
+         cxn->takesOkayed - cxn->takesOkayed_checkpoint,
+         cxn->checksRefused - cxn->checksRefused_checkpoint,
+         cxn->takesRejected - cxn->takesRejected_checkpoint,
+         cxn->takesSizeOkayed - cxn->takesSizeOkayed_checkpoint,
+         cxn->takesSizeRejected - cxn->takesSizeRejected_checkpoint);
 
-  if (final)
-    {
-      cxn->artsTaken = 0 ;
-      cxn->checksIssued = 0 ;
-      cxn->checksRefused = 0 ;
-      cxn->takesRejected = 0 ;
-      cxn->takesOkayed = 0 ;
-      cxn->takesSizeRejected = 0 ;
-      cxn->takesSizeOkayed = 0 ;
+  if (final) {
+    notice("%s:%d final seconds %ld offered %d accepted %d refused %d"
+           " rejected %d accsize %.0f rejsize %.0f",
+           peerName, cxn->ident, (long) (now - cxn->timeCon),
+           cxn->checksIssued, cxn->takesOkayed, cxn->checksRefused,
+           cxn->takesRejected, cxn->takesSizeOkayed, cxn->takesSizeRejected);
 
-      if (cxn->timeCon > 0)
-        cxn->timeCon = theTime() ;
-    }
+    cxn->artsTaken = 0;
+    cxn->checksIssued = 0;
+    cxn->checksRefused = 0;
+    cxn->takesRejected = 0;
+    cxn->takesOkayed = 0;
+    cxn->takesSizeRejected = 0;
+    cxn->takesSizeOkayed = 0;
+
+      if (cxn->timeCon > 0) {
+        cxn->timeCon = theTime();
+      }
+  }
+
+  cxn->timeCon_checkpoint = now;
+  cxn->checksIssued_checkpoint = cxn->checksIssued;
+  cxn->takesOkayed_checkpoint = cxn->takesOkayed;
+  cxn->checksRefused_checkpoint = cxn->checksRefused;
+  cxn->takesRejected_checkpoint = cxn->takesRejected;
+  cxn->takesSizeOkayed_checkpoint = cxn->takesSizeOkayed;
+  cxn->takesSizeRejected_checkpoint = cxn->takesSizeRejected;
 }
 
 
@@ -1806,7 +1835,9 @@
             }
           
           /* now we consider ourselves completly connected. */
-          cxn->timeCon = theTime () ;
+          cxn->timeCon = theTime();
+          cxn->timeCon_checkpoint = theTime();
+
           if (cxn->articleQTotal == 0)
             cxnIdle (cxn) ;
           else
@@ -3747,6 +3778,14 @@
   cxn->takesSizeRejected = 0 ;
   cxn->takesSizeOkayed = 0 ;
 
+  cxn->timeCon_checkpoint = 0;
+  cxn->checksIssued_checkpoint = 0;
+  cxn->checksRefused_checkpoint = 0;
+  cxn->takesRejected_checkpoint = 0;
+  cxn->takesOkayed_checkpoint = 0;
+  cxn->takesSizeRejected_checkpoint = 0;
+  cxn->takesSizeOkayed_checkpoint = 0;
+
   cxn->filterValue = 0.0 ;
 }
 

Modified: innfeed/host.c
===================================================================
--- innfeed/host.c	2010-03-16 19:53:26 UTC (rev 9015)
+++ innfeed/host.c	2010-03-19 19:50:05 UTC (rev 9016)
@@ -161,19 +161,32 @@
 
     /* these numbers get reset periodically (after a 'final' logging). */
     unsigned int artsOffered ;         /* # of articles we offered to remote. */
+    unsigned int artsOffered_checkpoint ;
     unsigned int artsAccepted ;        /* # of articles succesfully transferred */
+    unsigned int artsAccepted_checkpoint ;
     unsigned int artsNotWanted ;       /* # of articles remote already had */
+    unsigned int artsNotWanted_checkpoint ;
     unsigned int artsRejected ;        /* # of articles remote rejected */
+    unsigned int artsRejected_checkpoint ;
     unsigned int artsDeferred ;        /* # of articles remote asked us to retry */
+    unsigned int artsDeferred_checkpoint ;
     unsigned int artsMissing ;         /* # of articles whose file was missing. */
+    unsigned int artsMissing_checkpoint ;
     unsigned int artsToTape ;          /* # of articles given to tape */
+    unsigned int artsToTape_checkpoint ;
     unsigned int artsQueueOverflow ;   /* # of articles that overflowed `queued' */
     unsigned int artsCxnDrop ;         /* # of articles caught in dead cxn */
+    unsigned int artsCxnDrop_checkpoint ;
     unsigned int artsHostSleep ;       /* # of articles spooled by sleeping host */
+    unsigned int artsHostSleep_checkpoint ;
     unsigned int artsHostClose ;       /* # of articles caught by closing host */
+    unsigned int artsHostClose_checkpoint ;
     unsigned int artsFromTape ;        /* # of articles we pulled off tape */
+    unsigned int artsFromTape_checkpoint ;
     double artsSizeAccepted ;	/* size of articles succesfully transferred */
+    double artsSizeAccepted_checkpoint ;
     double artsSizeRejected ;	/* size of articles remote rejected */
+    double artsSizeRejected_checkpoint ;
 
     /* Dynamic Peerage - MGF */
     unsigned int artsProcLastPeriod ;  /* # of articles processed in last period */
@@ -210,8 +223,12 @@
     time_t connectTime ;        /* the time the first connection was fully
                                    set up (MODE STREAM and everything
                                    else). */
+    time_t connectTime_checkpoint ;
+
     time_t spoolTime ;          /* the time the Host had to revert to
                                    spooling articles to tape. */
+    time_t spoolTime_checkpoint ;
+
     time_t lastSpoolTime ;      /* the time the last time the Host had to
                                    revert to spooling articles to tape. */
     time_t nextIpLookup ;	/* time of last IP name resolution */
@@ -1037,19 +1054,32 @@
   nh->isDynamic = false ;
 
   nh->artsOffered = 0 ;
+  nh->artsOffered_checkpoint = 0 ;
   nh->artsAccepted = 0 ;
+  nh->artsAccepted_checkpoint = 0 ;
   nh->artsNotWanted = 0 ;
+  nh->artsNotWanted_checkpoint = 0 ;
   nh->artsRejected = 0 ;
+  nh->artsRejected_checkpoint = 0 ;
   nh->artsDeferred = 0 ;
+  nh->artsDeferred_checkpoint = 0 ;
   nh->artsMissing = 0 ;
+  nh->artsMissing_checkpoint = 0 ;
   nh->artsToTape = 0 ;
+  nh->artsToTape_checkpoint = 0 ;
   nh->artsQueueOverflow = 0 ;
   nh->artsCxnDrop = 0 ;
+  nh->artsCxnDrop_checkpoint = 0 ;
   nh->artsHostSleep = 0 ;
+  nh->artsHostSleep_checkpoint = 0 ;
   nh->artsHostClose = 0 ;
+  nh->artsHostClose_checkpoint = 0 ;
   nh->artsFromTape = 0 ;
+  nh->artsFromTape_checkpoint = 0 ;
   nh->artsSizeAccepted = 0 ;
+  nh->artsSizeAccepted_checkpoint = 0 ;
   nh->artsSizeRejected = 0 ;
+  nh->artsSizeRejected_checkpoint = 0 ;
 
   nh->artsProcLastPeriod = 0;
   nh->secsInLastPeriod = 0;
@@ -1083,8 +1113,10 @@
   
   nh->firstConnectTime = 0 ;
   nh->connectTime = 0 ;
+  nh->connectTime_checkpoint = 0 ;
   
   nh->spoolTime = 0 ;
+  nh->spoolTime_checkpoint = 0 ;
 
   nh->blNone = 0 ;
   nh->blFull = 0 ;
@@ -1898,6 +1930,8 @@
       host->remoteStreams = (host->params->wantStreaming ? doesStreaming : false) ;
 
       host->connectTime = theTime() ;
+      host->connectTime_checkpoint = host->connectTime ;
+
       if (host->firstConnectTime == 0)
         host->firstConnectTime = host->connectTime ;
     }
@@ -2953,6 +2987,8 @@
   hostLogStats (host,true) ;
   
   host->spoolTime = theTime() ;
+  host->spoolTime_checkpoint = host->spoolTime ;
+
   if (host->firstConnectTime == 0)
     host->firstConnectTime = host->spoolTime ;
 
@@ -2979,7 +3015,7 @@
 
 
 /*
- * Time to log the statistics for the Host. If FINAL is true then the
+ * Time to log the statistics for the Host.  If FINAL is true then the
  * counters will be reset.
  */
 static void hostLogStats (Host host, bool final)
@@ -2987,42 +3023,102 @@
   time_t now = theTime() ;
   time_t *startPeriod ;
   double cnt = (host->blCount) ? (host->blCount) : 1.0;
-  char msgstr[SMBUF] ;
 
   if (host->spoolTime == 0 && host->connectTime == 0)
-    return ;        /* host has never connected and never started spooling*/
+    return ;        /* host has never connected and never started spooling. */
 
   startPeriod = (host->spoolTime != 0 ? &host->spoolTime : &host->connectTime);
 
   if (now - *startPeriod >= statsResetPeriod)
     final = true ;
   
-  if (host->spoolTime != 0)
-    notice ("%s %s seconds %ld spooled %d on_close %d sleeping %d",
-            host->params->peerName, (final ? "final" : "checkpoint"),
-            (long) (now - host->spoolTime), host->artsToTape,
-            host->artsHostClose, host->artsHostSleep) ;
-  else {
-    snprintf(msgstr, sizeof(msgstr), "accsize %.0f rejsize %.0f",
-             host->artsSizeAccepted, host->artsSizeRejected);
-    notice ("%s %s seconds %ld offered %d accepted %d refused %d rejected %d"
-            " missing %d %s spooled %d on_close %d unspooled %d"
-            " deferred %d/%.1f requeued %d"
-            " queue %.1f/%d:%.0f,%.0f,%.0f,%.0f,%.0f,%.0f",
-            host->params->peerName, (final ? "final" : "checkpoint"),
-            (long) (now - host->connectTime),
-            host->artsOffered, host->artsAccepted,
-            host->artsNotWanted, host->artsRejected,
-            host->artsMissing, msgstr,
-            host->artsToTape,
-            host->artsHostClose, host->artsFromTape,
-            host->artsDeferred, (double)host->dlAccum/cnt,
-            host->artsCxnDrop,
-            (double)host->blAccum/cnt, hostHighwater,
-            (100.0*host->blNone)/cnt,
-            (100.0*host->blQuartile[0])/cnt, (100.0*host->blQuartile[1])/cnt,
-            (100.0*host->blQuartile[2])/cnt, (100.0*host->blQuartile[3])/cnt,
-            (100.0*host->blFull)/cnt) ;
+  if (host->spoolTime != 0) {
+    /* Log a checkpoint in any case. */
+    notice("%s checkpoint seconds %ld spooled %d on_close %d sleeping %d",
+           host->params->peerName,
+           (long) (now - host->spoolTime_checkpoint),
+           host->artsToTape - host->artsToTape_checkpoint,
+           host->artsHostClose - host->artsHostClose_checkpoint,
+           host->artsHostSleep - host->artsHostSleep_checkpoint);
+
+    host->spoolTime_checkpoint = now;
+    host->artsToTape_checkpoint = host->artsToTape;
+    host->artsHostClose_checkpoint = host->artsHostClose;
+    host->artsHostSleep_checkpoint = host->artsHostSleep;
+
+    if (final) {
+      notice("%s final seconds %ld spooled %d on_close %d sleeping %d",
+             host->params->peerName,
+             (long) (now - host->spoolTime), host->artsToTape,
+             host->artsHostClose, host->artsHostSleep);
+    }
+  } else {
+    /* Log a checkpoint in any case.
+     *
+     * Note that deferred and queue values are cumulative
+     * (and not treated by innreport). */
+    notice("%s checkpoint seconds %ld offered %d accepted %d refused %d rejected %d"
+           " missing %d accsize %.0f rejsize %.0f spooled %d on_close %d unspooled %d"
+           " deferred %d/%.1f requeued %d"
+           " queue %.1f/%d:%.0f,%.0f,%.0f,%.0f,%.0f,%.0f",
+           host->params->peerName,
+           (long) (now - host->connectTime_checkpoint),
+           host->artsOffered - host->artsOffered_checkpoint,
+           host->artsAccepted - host->artsAccepted_checkpoint,
+           host->artsNotWanted - host->artsNotWanted_checkpoint,
+           host->artsRejected - host->artsRejected_checkpoint,
+           host->artsMissing - host->artsMissing_checkpoint,
+           host->artsSizeAccepted - host->artsSizeAccepted_checkpoint,
+           host->artsSizeRejected - host->artsSizeRejected_checkpoint,
+           host->artsToTape - host->artsToTape_checkpoint,
+           host->artsHostClose - host->artsHostClose_checkpoint,
+           host->artsFromTape - host->artsFromTape_checkpoint,
+           host->artsDeferred - host->artsDeferred_checkpoint,
+           (double)host->dlAccum/cnt,
+           host->artsCxnDrop - host->artsCxnDrop_checkpoint,
+           (double)host->blAccum/cnt,
+           hostHighwater,
+           (100.0*host->blNone)/cnt,
+           (100.0*host->blQuartile[0])/cnt,
+           (100.0*host->blQuartile[1])/cnt,
+           (100.0*host->blQuartile[2])/cnt,
+           (100.0*host->blQuartile[3])/cnt,
+           (100.0*host->blFull)/cnt);
+
+    host->connectTime_checkpoint = now;
+    host->artsOffered_checkpoint = host->artsOffered;
+    host->artsAccepted_checkpoint = host->artsAccepted;
+    host->artsNotWanted_checkpoint = host->artsNotWanted;
+    host->artsRejected_checkpoint = host->artsRejected;
+    host->artsMissing_checkpoint = host->artsMissing;
+    host->artsSizeAccepted_checkpoint = host->artsSizeAccepted;
+    host->artsSizeRejected_checkpoint = host->artsSizeRejected;
+    host->artsToTape_checkpoint = host->artsToTape;
+    host->artsHostClose_checkpoint = host->artsHostClose;
+    host->artsFromTape_checkpoint = host->artsFromTape;
+    host->artsDeferred_checkpoint = host->artsDeferred;
+    host->artsCxnDrop_checkpoint = host->artsCxnDrop;
+
+    if (final) {
+      notice("%s final seconds %ld offered %d accepted %d refused %d rejected %d"
+             " missing %d accsize %.0f rejsize %.0f spooled %d on_close %d unspooled %d"
+             " deferred %d/%.1f requeued %d"
+             " queue %.1f/%d:%.0f,%.0f,%.0f,%.0f,%.0f,%.0f",
+             host->params->peerName,
+             (long) (now - host->connectTime),
+             host->artsOffered, host->artsAccepted,
+             host->artsNotWanted, host->artsRejected,
+             host->artsMissing, host->artsSizeAccepted, host->artsSizeRejected,
+             host->artsToTape,
+             host->artsHostClose, host->artsFromTape,
+             host->artsDeferred, (double)host->dlAccum/cnt,
+             host->artsCxnDrop,
+             (double)host->blAccum/cnt, hostHighwater,
+             (100.0*host->blNone)/cnt,
+             (100.0*host->blQuartile[0])/cnt, (100.0*host->blQuartile[1])/cnt,
+             (100.0*host->blQuartile[2])/cnt, (100.0*host->blQuartile[3])/cnt,
+             (100.0*host->blFull)/cnt);
+    }
   }
 
   if (logConnectionStats) 
@@ -3040,32 +3136,47 @@
 
   if (final)
     {
+      /* We also reset checkpoints because the same host structure
+       * may be used again. */
       host->artsOffered = 0 ;
+      host->artsOffered_checkpoint = 0 ;
       host->artsAccepted = 0 ;
+      host->artsAccepted_checkpoint = 0 ;
       host->artsNotWanted = 0 ;
+      host->artsNotWanted_checkpoint = 0 ;
       host->artsRejected = 0 ;
+      host->artsRejected_checkpoint = 0 ;
       host->artsDeferred = 0 ;
+      host->artsDeferred_checkpoint = 0 ;
       host->artsMissing = 0 ;
+      host->artsMissing_checkpoint = 0 ;
       host->artsToTape = 0 ;
+      host->artsToTape_checkpoint = 0 ;
       host->artsQueueOverflow = 0 ;
       host->artsCxnDrop = 0 ;
+      host->artsCxnDrop_checkpoint = 0 ;
       host->artsHostSleep = 0 ;
+      host->artsHostSleep_checkpoint = 0 ;
       host->artsHostClose = 0 ;
+      host->artsHostClose_checkpoint = 0 ;
       host->artsFromTape = 0 ;
+      host->artsFromTape_checkpoint = 0 ;
       host->artsSizeAccepted = 0 ;
+      host->artsSizeAccepted_checkpoint = 0 ;
       host->artsSizeRejected = 0 ;
+      host->artsSizeRejected_checkpoint = 0 ;
       
       *startPeriod = theTime () ; /* in of case STATS_RESET_PERIOD */
     }
 
-    /* reset these each log period */
-    host->blNone = 0 ;
-    host->blFull = 0 ;
-    host->blQuartile[0] = host->blQuartile[1] = host->blQuartile[2] =
-                          host->blQuartile[3] = 0;
-    host->dlAccum = 0;
-    host->blAccum = 0;
-    host->blCount = 0;
+  /* Reset these each log period. */
+  host->blNone = 0 ;
+  host->blFull = 0 ;
+  host->blQuartile[0] = host->blQuartile[1] = host->blQuartile[2] =
+                        host->blQuartile[3] = 0;
+  host->dlAccum = 0;
+  host->blAccum = 0;
+  host->blCount = 0;
 
 #if 0
   /* XXX turn this section on to get a snapshot at each log period. */

Modified: scripts/innreport.in
===================================================================
--- scripts/innreport.in	2010-03-16 19:53:26 UTC (rev 9015)
+++ scripts/innreport.in	2010-03-19 19:50:05 UTC (rev 9016)
@@ -6,6 +6,8 @@
 #   innreport:  Perl script to summarize news log files
 #               (with optional HTML output and graphs).
 #
+# $Id$
+#
 # Version 3.1.0.
 #
 # Copyright (c) 1996-2001, Fabien Tassin <fta at sofaraway.org>.

Modified: scripts/innreport_inn.pm
===================================================================
--- scripts/innreport_inn.pm	2010-03-16 19:53:26 UTC (rev 9015)
+++ scripts/innreport_inn.pm	2010-03-19 19:50:05 UTC (rev 9016)
@@ -1,6 +1,8 @@
 ##########################################################################
 # INN module for innreport (3.*).
 #
+# $Id$
+#
 # Sample file tested with INN 2.5, 2.4, 2.3, 2.2, 1.7.2 and 1.5.1.
 #
 # (c) 1997-2001 by Fabien Tassin <fta at sofaraway.org>.
@@ -882,12 +884,14 @@
     return 1 if $left =~ m/\S+:\d+ closed periodic$/o;
     # periodic close
     return 1 if $left =~ m/\S+:\d+ periodic close$/o;
+    # checkpoint (child)
+    return 1 if $left =~ m/\S+:\d+ checkpoint seconds \d+ offered \d+ accepted \d+ refused \d+ rejected \d+/o;
     # final (child)
     return 1 if $left =~ m/\S+:\d+ final seconds \d+ offered \d+ accepted \d+ refused \d+ rejected \d+/o;
     # global (real)
     return 1 if $left =~ m/\S+ global seconds \d+ offered \d+ accepted \d+ refused \d+ rejected \d+ missing \d+/o;
-    # final (real) (new format)
-    if ($left =~ /(\S+) final seconds (\d+) offered (\d+) accepted (\d+) refused (\d+) rejected (\d+) missing (\d+) accsize (\d+) rejsize (\d+) spooled (\d+)/o) {
+    # checkpoint (real) (new format)
+    if ($left =~ /(\S+) checkpoint seconds (\d+) offered (\d+) accepted (\d+) refused (\d+) rejected (\d+) missing (\d+) accsize (\d+) rejsize (\d+) spooled (\d+)/o) {
       my ($server, $seconds, $offered, $accepted, $refused, $rejected,
 	  $missing, $accepted_size, $rejected_size, $spooled) = ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10);
       $server = lc $server unless $CASE_SENSITIVE;
@@ -901,9 +905,9 @@
       $innfeed_accepted_size{$server} += $accepted_size;
       $innfeed_rejected_size{$server} += $rejected_size;
       return 1;
-    } elsif ($left =~ /(\S+) final seconds (\d+) offered (\d+) accepted (\d+) refused (\d+) rejected (\d+) missing (\d+) spooled (\d+)/o) {
+    } elsif ($left =~ /(\S+) checkpoint seconds (\d+) offered (\d+) accepted (\d+) refused (\d+) rejected (\d+) missing (\d+) spooled (\d+)/o) {
       my ($server, $seconds, $offered, $accepted, $refused, $rejected,
-	  $missing, $spooled) = ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10);
+	  $missing, $spooled) = ($1, $2, $3, $4, $5, $6, $7, $8);
       $server = lc $server unless $CASE_SENSITIVE;
       $innfeed_seconds{$server} += $seconds;
       $innfeed_offered{$server} += $offered;
@@ -914,8 +918,8 @@
       $innfeed_spooled{$server} += $spooled;
       return 1;
     }
-    # final (only seconds & spooled)
-    if ($left =~ /(\S+) final seconds (\d+) spooled (\d+)/o) {
+    # checkpoint (only seconds & spooled)
+    if ($left =~ /(\S+) checkpoint seconds (\d+) spooled (\d+)/o) {
       my ($server, $seconds, $spooled) = ($1, $2, $3);
       $server = lc $server unless $CASE_SENSITIVE;
       # Initialize a value for that key (otherwise, it does not appear in the
@@ -925,8 +929,10 @@
       $innfeed_spooled{$server} += $spooled;
       return 1;
     }
-    # checkpoint
-    return 1 if $left =~ m/\S+ checkpoint seconds/o;
+
+    # final
+    return 1 if $left =~ m/\S+ final seconds/o;
+
     # ME file xxxx shrunk from yyyy to zzz
     if ($left =~ /^ME file (.*)\.output shrunk from (\d+) to (\d+)$/) {
       my ($file, $s1, $s2) = ($1, $2, $3);




More information about the inn-committers mailing list