summaryrefslogtreecommitdiffstats
path: root/plugins/check_swap.c
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2023-09-17 23:15:59 +0200
committerGitHub <noreply@github.com>2023-09-17 23:15:59 +0200
commitd3e07d2b5734149c1314cb98b48dd1adebd62686 (patch)
treea924b49927ae1925a7e0893d31e0c9c6abd3228e /plugins/check_swap.c
parent495c4c9adfa482303b31cdac7d28adda82d2d2ed (diff)
parent2ddc75e69db5a3dd379c896d8420c9af20ec1cee (diff)
downloadmonitoring-plugins-d3e07d2.tar.gz
Merge branch 'master' into dev/check_ssh-patches
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 25d5f21d..cd965e31 100644
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
@@ -178,7 +178,7 @@ main (int argc, char **argv)
178# ifdef _AIX 178# ifdef _AIX
179 if (!allswaps) { 179 if (!allswaps) {
180 xasprintf(&swap_command, "%s", "/usr/sbin/lsps -s"); 180 xasprintf(&swap_command, "%s", "/usr/sbin/lsps -s");
181 xasprintf(&swap_format, "%s", "%f%*s %f"); 181 xasprintf(&swap_format, "%s", "%lu%*s %lu");
182 conv_factor = 1; 182 conv_factor = 1;
183 } 183 }
184# endif 184# endif
@@ -205,9 +205,9 @@ main (int argc, char **argv)
205 temp_buffer = strtok (input_buffer, " \n"); 205 temp_buffer = strtok (input_buffer, " \n");
206 while (temp_buffer) { 206 while (temp_buffer) {
207 if (strstr (temp_buffer, "blocks")) 207 if (strstr (temp_buffer, "blocks"))
208 sprintf (str, "%s %s", str, "%f"); 208 sprintf (str, "%s %s", str, "%lu");
209 else if (strstr (temp_buffer, "dskfree")) 209 else if (strstr (temp_buffer, "dskfree"))
210 sprintf (str, "%s %s", str, "%f"); 210 sprintf (str, "%s %s", str, "%lu");
211 else 211 else
212 sprintf (str, "%s %s", str, "%*s"); 212 sprintf (str, "%s %s", str, "%*s");
213 temp_buffer = strtok (NULL, " \n"); 213 temp_buffer = strtok (NULL, " \n");
@@ -552,7 +552,7 @@ validate_arguments (void)
552 } 552 }
553 else if ((warn.is_percentage == crit.is_percentage) && (warn.value < crit.value)) { 553 else if ((warn.is_percentage == crit.is_percentage) && (warn.value < crit.value)) {
554 /* This is NOT triggered if warn and crit are different units, e.g warn is percentage 554 /* This is NOT triggered if warn and crit are different units, e.g warn is percentage
555 * and crit is absolut. We cannot determine the condition at this point since we 555 * and crit is absolute. We cannot determine the condition at this point since we
556 * dont know the value of total swap yet 556 * dont know the value of total swap yet
557 */ 557 */
558 usage4(_("Warning should be more than critical")); 558 usage4(_("Warning should be more than critical"));