Fix missed system.io chart
Vladimir Kobal committed
Mar 17, 2017 at 09:39 UTC
d68cc9dbc13a46d32b1f4a3f2e7e56cf447c0582
1 file changed
+2
-3
src/freebsd_sysctl.c
+2
-3
@@ -3458,7 +3458,7 @@ int do_kern_devstat(int update_every, usec_t dt) {
3458
dstat = devstat_data + sizeof(long); // skip generation number
3459
3460
for (i = 0; i < numdevs; i++) {
3461
- if (unlikely(!do_system_io)) {
3461
+ if (likely(do_system_io)) {
3462
if (((dstat[i].device_type & DEVSTAT_TYPE_MASK) == DEVSTAT_TYPE_DIRECT) || ((dstat[i].device_type & DEVSTAT_TYPE_MASK) == DEVSTAT_TYPE_STORARRAY)) {
3463
total_disk_kbytes_read += dstat[i].bytes[DEVSTAT_READ] / KILO_FACTOR;
3464
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) {
3864
3865
// --------------------------------------------------------------------
3866
3867
- if (unlikely(!do_system_io)) {
3867
+ if (likely(do_system_io)) {
3868
static RRDSET *st = NULL;
3869
static RRDDIM *rd_in = NULL, *rd_out = NULL;
3870
3871
- st = rrdset_find_bytype_localhost("system", "io");
3871
if (unlikely(!st)) {
3872
st = rrdset_create_localhost("system",
3873
"io",