]> arthur.barton.de Git - netdata.git/commitdiff
Exclude speculative from free pages count in macOS plugin
authorVladimir Kobal <vlad@prokk.net>
Wed, 28 Dec 2016 08:33:52 +0000 (03:33 -0500)
committerVladimir Kobal <vlad@prokk.net>
Wed, 28 Dec 2016 08:33:52 +0000 (03:33 -0500)
src/macos_mach_smi.c

index 2d93c7a400fcfc76803d18a1d96c4a1087d4205d..58510688888d8c5b9b43c78072651dd4fe72005a 100644 (file)
@@ -93,8 +93,8 @@ int do_macos_mach_smi(int update_every, usec_t dt) {
                     rrddim_add(st, "throttled", NULL, system_pagesize, 1048576, RRDDIM_ABSOLUTE);
                     rrddim_add(st, "compressor", NULL, system_pagesize, 1048576, RRDDIM_ABSOLUTE);
                     rrddim_add(st, "inactive",  NULL, system_pagesize, 1048576, RRDDIM_ABSOLUTE);
-                    rrddim_add(st, "speculative", NULL, system_pagesize, 1048576, RRDDIM_ABSOLUTE);
                     rrddim_add(st, "purgeable", NULL, system_pagesize, 1048576, RRDDIM_ABSOLUTE);
+                    rrddim_add(st, "speculative", NULL, system_pagesize, 1048576, RRDDIM_ABSOLUTE);
                     rrddim_add(st, "free",      NULL, system_pagesize, 1048576, RRDDIM_ABSOLUTE);
                 }
                 else rrdset_next(st);
@@ -104,9 +104,9 @@ int do_macos_mach_smi(int update_every, usec_t dt) {
                 rrddim_set(st, "throttled", vm_statistics.throttled_count);
                 rrddim_set(st, "compressor", vm_statistics.compressor_page_count);
                 rrddim_set(st, "inactive",  vm_statistics.inactive_count);
-                rrddim_set(st, "speculative", vm_statistics.speculative_count);
                 rrddim_set(st, "purgeable", vm_statistics.purgeable_count);
-                rrddim_set(st, "free",      vm_statistics.free_count);
+                rrddim_set(st, "speculative", vm_statistics.speculative_count);
+                rrddim_set(st, "free",      (vm_statistics.free_count - vm_statistics.speculative_count));
                 rrdset_done(st);
             }