]> arthur.barton.de Git - netdata.git/blobdiff - src/proc_net_snmp.c
Fix mirrored disks stats issue in FreeBSD plugin
[netdata.git] / src / proc_net_snmp.c
index 10a729394625c663e1fb56bfefd3a58e6e2438b8..d7318fc817f8dda94a4a447430e1cc7c4ee59772 100644 (file)
@@ -43,7 +43,7 @@ static struct netstat_columns icmp_data[] = {
     { "OutErrors", 0, 0, -1, NULL },
     { "InCsumErrors", 0, 0, 1, NULL },
 
-    // all there are available in icmpmsg
+    // all these are available in icmpmsg
 //    { "InDestUnreachs", 0, 0, 1, NULL },
 //    { "OutDestUnreachs", 0, 0, -1, NULL },
 //    { "InTimeExcds", 0, 0, 1, NULL },
@@ -197,7 +197,7 @@ static void parse_line_pair(procfile *ff, struct netstat_columns *nc, uint32_t h
     }
 }
 
-int do_proc_net_snmp(int update_every, unsigned long long dt) {
+int do_proc_net_snmp(int update_every, usec_t dt) {
     (void)dt;
 
     static procfile *ff = NULL;
@@ -360,8 +360,8 @@ int do_proc_net_snmp(int update_every, unsigned long long dt) {
         char filename[FILENAME_MAX + 1];
         snprintfz(filename, FILENAME_MAX, "%s%s", global_host_prefix, "/proc/net/snmp");
         ff = procfile_open(config_get("plugin:proc:/proc/net/snmp", "filename to monitor", filename), " \t:", PROCFILE_FLAG_DEFAULT);
+        if(unlikely(!ff)) return 1;
     }
-    if(unlikely(!ff)) return 1;
 
     ff = procfile_readall(ff);
     if(unlikely(!ff)) return 0; // we return 0, so that we will retry to open it next time