100-debian-statistics.patch 843 B

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