diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index 5edb8061f25dcd8e1c8184b72ee2ce96513fbb98..b92694d90ef923a87b59047a598d2736561d099f 100644 (file)
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
print_usage ();
print_usage ();
- printf (_(HELP_VRSN));
+ printf (_(UT_HELP_VRSN));
printf (_("\n\
-w, --warning=INTEGER\n\
printf (_("\n\
-w, --warning=INTEGER\n\
char *status = "";
if (process_arguments (argc, argv) != OK)
char *status = "";
if (process_arguments (argc, argv) != OK)
- usage ("Invalid command arguments supplied\n");
+ usage (_("Invalid command arguments supplied\n"));
#ifdef HAVE_PROC_MEMINFO
fp = fopen (PROC_MEMINFO, "r");
#ifdef HAVE_PROC_MEMINFO
fp = fopen (PROC_MEMINFO, "r");
}
if (verbose >= 2)
}
if (verbose >= 2)
- printf ("Command: %s\n", swap_command);
+ printf (_("Command: %s\n"), swap_command);
if (verbose >= 3)
if (verbose >= 3)
- printf ("Format: %s\n", swap_format);
+ printf ("_(Format: %s\n"), swap_format);
child_process = spopen (swap_command);
if (child_process == NULL) {
child_process = spopen (swap_command);
if (child_process == NULL) {
- printf ("Could not open pipe: %s\n", swap_command);
+ printf (_("Could not open pipe: %s\n"), swap_command);
return STATE_UNKNOWN;
}
child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r");
if (child_stderr == NULL)
return STATE_UNKNOWN;
}
child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r");
if (child_stderr == NULL)
- printf ("Could not open stderr for %s\n", swap_command);
+ printf (_("Could not open stderr for %s\n"), swap_command);
sprintf (str, "%s", "");
/* read 1st line */
sprintf (str, "%s", "");
/* read 1st line */
dsktotal = dsktotal / conv_factor;
dskfree = dskfree / conv_factor;
if (verbose >= 3)
dsktotal = dsktotal / conv_factor;
dskfree = dskfree / conv_factor;
if (verbose >= 3)
- printf ("total=%d, free=%d\n", dsktotal, dskfree);
+ printf (_("total=%d, free=%d\n"), dsktotal, dskfree);
dskused = dsktotal - dskfree;
#endif
dskused = dsktotal - dskfree;
#endif
}
percent_used = 100 * ((double) used_swap) / ((double) total_swap);
result = max_state (result, check_swap (percent_used, free_swap));
}
percent_used = 100 * ((double) used_swap) / ((double) total_swap);
result = max_state (result, check_swap (percent_used, free_swap));
- asprintf (&status, " %d%% free (%lu MB out of %lu MB)%s",
+ asprintf (&status, _(" %d%% free (%lu MB out of %lu MB)%s"),
(100 - percent_used), free_swap, total_swap, status);
#ifdef HAVE_PROC_MEMINFO
(100 - percent_used), free_swap, total_swap, status);
#ifdef HAVE_PROC_MEMINFO
result = max_state (result, STATE_WARNING);
#endif
result = max_state (result, STATE_WARNING);
#endif
- terminate (result, "SWAP %s:%s\n", state_text (result), status);
+ die (result, "SWAP %s:%s\n", state_text (result), status);
return STATE_UNKNOWN;
}
return STATE_UNKNOWN;
}
break;
}
else {
break;
}
else {
- usage ("Warning threshold must be integer or percentage!\n");
+ usage (_("Warning threshold must be integer or percentage!\n"));
}
wc++;
case 'c': /* critical time threshold */
}
wc++;
case 'c': /* critical time threshold */
break;
}
else {
break;
}
else {
- usage ("Critical threshold must be integer or percentage!\n");
+ usage (_("Critical threshold must be integer or percentage!\n"));
}
cc++;
case 'a': /* all swap */
}
cc++;
case 'a': /* all swap */
print_help ();
exit (STATE_OK);
case '?': /* help */
print_help ();
exit (STATE_OK);
case '?': /* help */
- usage ("Invalid argument\n");
+ usage (_("Invalid argument\n"));
}
}
}
}
}
else if (warn_percent < crit_percent) {
usage
}
else if (warn_percent < crit_percent) {
usage
- ("Warning percentage should be more than critical percentage\n");
+ (_("Warning percentage should be more than critical percentage\n"));
}
else if (warn_size < crit_size) {
usage
}
else if (warn_size < crit_size) {
usage
- ("Warning free space should be more than critical free space\n");
+ (_("Warning free space should be more than critical free space\n"));
}
return OK;
}
}
return OK;
}