expose storage health metric value in bytes
Fix logic to expose storage health metric in bytes rather than KiB.
Change-Id: Ie8b5c1953076a4d1c7795836e64d871c80a59043
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/health_metric_collection.cpp b/health_metric_collection.cpp
index 1fc0757..2aa0ea2 100644
--- a/health_metric_collection.cpp
+++ b/health_metric_collection.cpp
@@ -180,8 +180,8 @@
strerror(e), "PATH", config.path);
continue;
}
- double total = buffer.f_blocks * (buffer.f_frsize / 1024);
- double available = buffer.f_bfree * (buffer.f_frsize / 1024);
+ double total = buffer.f_blocks * buffer.f_frsize;
+ double available = buffer.f_bfree * buffer.f_frsize;
double availablePercent = ((available / total) * 100);
debug("Storage Metric {SUBTYPE}: {TOTAL} {AVAIL} {AVAIL_PERCENT}",