aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/check_swap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index 63af4ccc..96eacf35 100644
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
@@ -80,6 +80,9 @@ main (int argc, char **argv)
while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, fp)) {
if (sscanf (input_buffer, " %s %lu %lu %lu", str, &total, &used, &free) == 4 &&
strstr (str, "Swap")) {
+ total = total / 1048576;
+ used = used / 1048576;
+ free = free / 1048576;
#endif
#ifdef HAVE_SWAP
if (!allswaps && sun) {