]> arthur.barton.de Git - netdata.git/blobdiff - src/proc_vmstat.c
Merge pull request #1744 from l2isbad/web_log_plugin
[netdata.git] / src / proc_vmstat.c
index d1aac04cdc9b81444455cb07b7ea89efc3fd6a2e..ea917b989197be09319fcb439711073f71680602 100644 (file)
@@ -1,5 +1,4 @@
 #include "common.h"
-#include "adaptive_resortable_list.h"
 
 int do_proc_vmstat(int update_every, usec_t dt) {
     (void)dt;
@@ -32,7 +31,7 @@ int do_proc_vmstat(int update_every, usec_t dt) {
         do_numa = config_get_boolean_ondemand("plugin:proc:/proc/vmstat", "system-wide numa metric summary", CONFIG_ONDEMAND_ONDEMAND);
 
 
-        arl_base = arl_create(NULL, 60);
+        arl_base = arl_create("vmstat", NULL, 60);
         arl_expect(arl_base, "pgfault", &pgfault);
         arl_expect(arl_base, "pgmajfault", &pgmajfault);
         arl_expect(arl_base, "pgpgin", &pgpgin);
@@ -71,13 +70,13 @@ int do_proc_vmstat(int update_every, usec_t dt) {
     ff = procfile_readall(ff);
     if(unlikely(!ff)) return 0; // we return 0, so that we will retry to open it next time
 
-    uint32_t lines = procfile_lines(ff), l;
+    size_t lines = procfile_lines(ff), l;
 
     arl_begin(arl_base);
     for(l = 0; l < lines ;l++) {
-        uint32_t words = procfile_linewords(ff, l);
+        size_t words = procfile_linewords(ff, l);
         if(unlikely(words < 2)) {
-            if(unlikely(words)) error("Cannot read /proc/vmstat line %u. Expected 2 params, read %u.", l, words);
+            if(unlikely(words)) error("Cannot read /proc/vmstat line %zu. Expected 2 params, read %zu.", l, words);
             continue;
         }