From d68cc9dbc13a46d32b1f4a3f2e7e56cf447c0582 Mon Sep 17 00:00:00 2001 From: Vladimir Kobal Date: Fri, 17 Mar 2017 09:39:55 +0200 Subject: [PATCH] Fix missed system.io chart --- src/freebsd_sysctl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/freebsd_sysctl.c b/src/freebsd_sysctl.c index 174be91f..e4db3610 100644 --- a/src/freebsd_sysctl.c +++ b/src/freebsd_sysctl.c @@ -3458,7 +3458,7 @@ int do_kern_devstat(int update_every, usec_t dt) { dstat = devstat_data + sizeof(long); // skip generation number for (i = 0; i < numdevs; i++) { - if (unlikely(!do_system_io)) { + if (likely(do_system_io)) { if (((dstat[i].device_type & DEVSTAT_TYPE_MASK) == DEVSTAT_TYPE_DIRECT) || ((dstat[i].device_type & DEVSTAT_TYPE_MASK) == DEVSTAT_TYPE_STORARRAY)) { total_disk_kbytes_read += dstat[i].bytes[DEVSTAT_READ] / KILO_FACTOR; total_disk_kbytes_write += dstat[i].bytes[DEVSTAT_WRITE] / KILO_FACTOR; @@ -3864,11 +3864,10 @@ int do_kern_devstat(int update_every, usec_t dt) { // -------------------------------------------------------------------- - if (unlikely(!do_system_io)) { + if (likely(do_system_io)) { static RRDSET *st = NULL; static RRDDIM *rd_in = NULL, *rd_out = NULL; - st = rrdset_find_bytype_localhost("system", "io"); if (unlikely(!st)) { st = rrdset_create_localhost("system", "io", -- 2.39.2