lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

100-debian-statistics.patch (843B)


      1 --- a/agent/mibgroup/mibII/interfaces.c
      2 +++ b/agent/mibgroup/mibII/interfaces.c
      3 @@ -1590,6 +1590,10 @@ Interface_Scan_Init(void)
      4          struct ifnet   *nnew;
      5          char           *stats, *ifstart = line;
      6  
      7 +	/* Ignore interfaces with no statistics. */
      8 +	if (strstr(line, "No statistics available."))
      9 +	    continue;
     10 +
     11          if (line[strlen(line) - 1] == '\n')
     12              line[strlen(line) - 1] = '\0';
     13  
     14 @@ -1622,7 +1622,7 @@ Interface_Scan_Init(void)
     15                                                 &coll) != 5)) {
     16              if ((scan_line_to_use == scan_line_2_2)
     17                  && !strstr(line, "No statistics available"))
     18 -                snmp_log(LOG_ERR,
     19 +                snmp_log(LOG_DEBUG,
     20                           "/proc/net/dev data format error, line ==|%s|",
     21                           line);
     22              continue;