summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cedb6f1)
raw | patch | inline | side by side (parent: cedb6f1)
author | Marek Becka <marek.becka@superhosting.cz> | |
Tue, 9 Jun 2015 20:56:55 +0000 (16:56 -0400) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 11 Jun 2015 07:53:17 +0000 (08:53 +0100) |
src/swap.c | patch | blob | history |
diff --git a/src/swap.c b/src/swap.c
index a8276c7dd4267a0887a07a7547451a0a6eb76bf6..cfde4ea6d2bd9d194abbab16d4d2269e7347e114 100644 (file)
--- a/src/swap.c
+++ b/src/swap.c
if (total < used)
continue;
- swap_submit_usage (path, used, total - used, NULL, NAN);
+ swap_submit_usage (path, used * 1024.0, (total - used) * 1024.0,
+ NULL, NAN);
}
fclose (fh);
if (swap_used < 0.0)
return (EINVAL);
- swap_submit_usage (NULL, swap_used, swap_free,
- isnan (swap_cached) ? NULL : "cached", swap_cached);
+ swap_submit_usage (NULL, swap_used * 1024.0, swap_free * 1024.0,
+ isnan (swap_cached) ? NULL : "cached",
+ isnan (swap_cached) ? NAN : swap_cached * 1024.0);
return (0);
} /* }}} int swap_read_combined */