X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnetapp.c;h=21ddfd4de210f90f7726e4fe6733ab81fc1e4f33;hb=8546ff99889231cfc02b87fb23f9860f75726d96;hp=f47b0366a13aecdba3d5d2495f58cc4fc2ac4cc1;hpb=21a2da50cf272a88769e5794f2e3b57ac9256a92;p=collectd.git diff --git a/src/netapp.c b/src/netapp.c index f47b0366..21ddfd4d 100644 --- a/src/netapp.c +++ b/src/netapp.c @@ -1439,15 +1439,17 @@ static void cna_handle_volume_snap_usage(const host_config_t *host, data_volume_ elem_snap = na_iterator_next (&iter_snap)) { value = na_child_get_uint64(elem_snap, "cumulative-total", 0); + /* "cumulative-total" is the total size of the oldest snapshot plus all + * newer ones in blocks (1KB). We therefore are looking for the highest + * number of all snapshots - that's the size required for the snapshots. */ if (value > snap_used) snap_used = value; } na_elem_free (data); - /* snap_used is the total size of the oldest snapshot plus all - * newer ones in blocks (1KB). */ + /* snap_used is in 1024 byte blocks */ v->snap_used = snap_used * 1024; v->flags |= HAVE_VOLUME_USAGE_SNAP_USED; -} +} /* }}} void cna_handle_volume_snap_usage */ static int cna_handle_volume_usage_data (const host_config_t *host, /* {{{ */ cfg_volume_usage_t *cfg_volume, na_elem_t *data)