summaryrefslogtreecommitdiffstats
path: root/plugins/check_swap.c
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-07-30 04:07:53 +0000
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-07-30 04:07:53 +0000
commitccead7695f4c31401283b95547e9f9703a4c43f2 (patch)
tree56bbdd9ee3f9ee81ad16ee3e8c012851ed159852 /plugins/check_swap.c
parent1cb0499adcc043515c2b62bbf62dc4d6b10f8cc9 (diff)
downloadmonitoring-plugins-ccead7695f4c31401283b95547e9f9703a4c43f2.tar.gz
markup for translation
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@620 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_swap.c')
-rw-r--r--plugins/check_swap.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index 5edb8061..6dd2e086 100644
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
@@ -124,7 +124,7 @@ main (int argc, char **argv)
124 char *status = ""; 124 char *status = "";
125 125
126 if (process_arguments (argc, argv) != OK) 126 if (process_arguments (argc, argv) != OK)
127 usage ("Invalid command arguments supplied\n"); 127 usage (_("Invalid command arguments supplied\n"));
128 128
129#ifdef HAVE_PROC_MEMINFO 129#ifdef HAVE_PROC_MEMINFO
130 fp = fopen (PROC_MEMINFO, "r"); 130 fp = fopen (PROC_MEMINFO, "r");
@@ -147,19 +147,19 @@ main (int argc, char **argv)
147 } 147 }
148 148
149 if (verbose >= 2) 149 if (verbose >= 2)
150 printf ("Command: %s\n", swap_command); 150 printf (_("Command: %s\n"), swap_command);
151 if (verbose >= 3) 151 if (verbose >= 3)
152 printf ("Format: %s\n", swap_format); 152 printf ("_(Format: %s\n"), swap_format);
153 153
154 child_process = spopen (swap_command); 154 child_process = spopen (swap_command);
155 if (child_process == NULL) { 155 if (child_process == NULL) {
156 printf ("Could not open pipe: %s\n", swap_command); 156 printf (_("Could not open pipe: %s\n"), swap_command);
157 return STATE_UNKNOWN; 157 return STATE_UNKNOWN;
158 } 158 }
159 159
160 child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r"); 160 child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r");
161 if (child_stderr == NULL) 161 if (child_stderr == NULL)
162 printf ("Could not open stderr for %s\n", swap_command); 162 printf (_("Could not open stderr for %s\n"), swap_command);
163 163
164 sprintf (str, "%s", ""); 164 sprintf (str, "%s", "");
165 /* read 1st line */ 165 /* read 1st line */
@@ -189,7 +189,7 @@ main (int argc, char **argv)
189 dsktotal = dsktotal / conv_factor; 189 dsktotal = dsktotal / conv_factor;
190 dskfree = dskfree / conv_factor; 190 dskfree = dskfree / conv_factor;
191 if (verbose >= 3) 191 if (verbose >= 3)
192 printf ("total=%d, free=%d\n", dsktotal, dskfree); 192 printf (_("total=%d, free=%d\n"), dsktotal, dskfree);
193 193
194 dskused = dsktotal - dskfree; 194 dskused = dsktotal - dskfree;
195#endif 195#endif
@@ -206,7 +206,7 @@ main (int argc, char **argv)
206 } 206 }
207 percent_used = 100 * ((double) used_swap) / ((double) total_swap); 207 percent_used = 100 * ((double) used_swap) / ((double) total_swap);
208 result = max_state (result, check_swap (percent_used, free_swap)); 208 result = max_state (result, check_swap (percent_used, free_swap));
209 asprintf (&status, " %d%% free (%lu MB out of %lu MB)%s", 209 asprintf (&status, _(" %d%% free (%lu MB out of %lu MB)%s"),
210 (100 - percent_used), free_swap, total_swap, status); 210 (100 - percent_used), free_swap, total_swap, status);
211 211
212#ifdef HAVE_PROC_MEMINFO 212#ifdef HAVE_PROC_MEMINFO
@@ -294,7 +294,7 @@ process_arguments (int argc, char **argv)
294 break; 294 break;
295 } 295 }
296 else { 296 else {
297 usage ("Warning threshold must be integer or percentage!\n"); 297 usage (_("Warning threshold must be integer or percentage!\n"));
298 } 298 }
299 wc++; 299 wc++;
300 case 'c': /* critical time threshold */ 300 case 'c': /* critical time threshold */
@@ -312,7 +312,7 @@ process_arguments (int argc, char **argv)
312 break; 312 break;
313 } 313 }
314 else { 314 else {
315 usage ("Critical threshold must be integer or percentage!\n"); 315 usage (_("Critical threshold must be integer or percentage!\n"));
316 } 316 }
317 cc++; 317 cc++;
318 case 'a': /* all swap */ 318 case 'a': /* all swap */
@@ -328,7 +328,7 @@ process_arguments (int argc, char **argv)
328 print_help (); 328 print_help ();
329 exit (STATE_OK); 329 exit (STATE_OK);
330 case '?': /* help */ 330 case '?': /* help */
331 usage ("Invalid argument\n"); 331 usage (_("Invalid argument\n"));
332 } 332 }
333 } 333 }
334 334
@@ -369,11 +369,11 @@ validate_arguments (void)
369 } 369 }
370 else if (warn_percent < crit_percent) { 370 else if (warn_percent < crit_percent) {
371 usage 371 usage
372 ("Warning percentage should be more than critical percentage\n"); 372 (_("Warning percentage should be more than critical percentage\n"));
373 } 373 }
374 else if (warn_size < crit_size) { 374 else if (warn_size < crit_size) {
375 usage 375 usage
376 ("Warning free space should be more than critical free space\n"); 376 (_("Warning free space should be more than critical free space\n"));
377 } 377 }
378 return OK; 378 return OK;
379} 379}