[Pkg-net-snmp-commits] [pkg-net-snmp] 01/27: _statistics

Hideki Yamane henrich at moszumanska.debian.org
Sun Aug 28 02:19:46 UTC 2016


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch patch-queue/master
in repository pkg-net-snmp.

commit b029513c14d8ba1c72bd7f613cfd27d0eaffdfe9
Author: Net-SNMP Packaging Team <pkg-net-snmp-devel at lists.alioth.debian.org>
Date:   Thu Jun 18 06:12:04 2015 +0900

    _statistics
    
    This patch ignores interfaces without statistics.
    
    
    Gbp-Pq: Name 02_statistics.patch
---
 agent/mibgroup/mibII/interfaces.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/agent/mibgroup/mibII/interfaces.c b/agent/mibgroup/mibII/interfaces.c
index 26ffebb..43f7427 100644
--- a/agent/mibgroup/mibII/interfaces.c
+++ b/agent/mibgroup/mibII/interfaces.c
@@ -1590,6 +1590,10 @@ Interface_Scan_Init(void)
         struct ifnet   *nnew;
         char           *stats, *ifstart = line;
 
+	/* Ignore interfaces with no statistics. */
+	if (strstr(line, "No statistics available."))
+	    continue;
+
         if (line[strlen(line) - 1] == '\n')
             line[strlen(line) - 1] = '\0';
 
@@ -1622,7 +1626,7 @@ Interface_Scan_Init(void)
                                                &coll) != 5)) {
             if ((scan_line_to_use == scan_line_2_2)
                 && !strstr(line, "No statistics available"))
-                snmp_log(LOG_ERR,
+                snmp_log(LOG_DEBUG,
                          "/proc/net/dev data format error, line ==|%s|",
                          line);
             continue;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git



More information about the Pkg-net-snmp-commits mailing list