]> 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 a75c0a96a334621240e1cd0a0bc5f70fb0764016..d7318fc817f8dda94a4a447430e1cc7c4ee59772 100644 (file)
@@ -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