summaryrefslogtreecommitdiffstats
path: root/plugins/check_swap.c
diff options
context:
space:
mode:
authorLorenz Kästle <lorenz.kaestle@netways.de>2022-01-03 14:07:54 +0100
committerLorenz Kästle <lorenz.kaestle@netways.de>2022-01-03 14:07:54 +0100
commitd496d6523bd0def281f001ddfb2a3f467bd9a4a6 (patch)
tree60b951b3a120e3e2db8c1e1d4146dfdbf45083b6 /plugins/check_swap.c
parent2714df42fd27ec377228a102acff3744d6bff86d (diff)
downloadmonitoring-plugins-d496d6523bd0def281f001ddfb2a3f467bd9a4a6.tar.gz
Rename tmp variable to get even with master
Diffstat (limited to 'plugins/check_swap.c')
-rw-r--r--plugins/check_swap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index 2b8013ba..bb854beb 100644
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
@@ -145,12 +145,12 @@ main (int argc, char **argv)
145 xasprintf (&status, "%s [%lu (%d%%)]", status, dskfree_mb, 100 - percent); 145 xasprintf (&status, "%s [%lu (%d%%)]", status, dskfree_mb, 100 - percent);
146 } 146 }
147 } 147 }
148 148
149 /* 149 /*
150 * The following sscanf call looks for lines looking like: "SwapTotal: 123" and "SwapFree: 123" 150 * The following sscanf call looks for lines looking like: "SwapTotal: 123" and "SwapFree: 123"
151 * This format exists at least on Debian Linux with a 5.* kernel 151 * This format exists at least on Debian Linux with a 5.* kernel
152 */ 152 */
153 else if (sscanf (input_buffer, "%*[S]%*[w]%*[a]%*[p]%[TotalFreCchd]%*[:] %f %*[k]%*[B]", str, &tmp_mb)) { 153 else if (sscanf (input_buffer, "%*[S]%*[w]%*[a]%*[p]%[TotalFreCchd]%*[:] %f %*[k]%*[B]", str, &tmp_KB)) {
154 if (verbose >= 3) { 154 if (verbose >= 3) {
155 printf("Got %s with %lu\n", str, tmp_KB); 155 printf("Got %s with %lu\n", str, tmp_KB);
156 } 156 }
@@ -159,10 +159,10 @@ main (int argc, char **argv)
159 dsktotal_mb = tmp_KB / 1024; 159 dsktotal_mb = tmp_KB / 1024;
160 } 160 }
161 else if (strcmp ("Free", str) == 0) { 161 else if (strcmp ("Free", str) == 0) {
162 dskfree_mb = dskfree_mb + tmp_mb / 1024; 162 dskfree_mb = dskfree_mb + tmp_KB / 1024;
163 } 163 }
164 else if (strcmp ("Cached", str) == 0) { 164 else if (strcmp ("Cached", str) == 0) {
165 dskfree_mb = dskfree_mb + tmp_mb / 1024; 165 dskfree_mb = dskfree_mb + tmp_KB / 1024;
166 } 166 }
167 } 167 }
168 } 168 }