summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-03-26 15:30:55 +0100
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-03-26 15:30:55 +0100
commit059de06c51996146695166c1bf8ba3f87b6089d0 (patch)
treeb7adc64f6d598c92feef62ab204dde511c2e4a14
parenta3ea7f03ad54017fe434513c7973d4148f652d5d (diff)
downloadmonitoring-plugins-059de06c51996146695166c1bf8ba3f87b6089d0.tar.gz
Formatting fixes
-rw-r--r--plugins/check_load.c48
1 files changed, 23 insertions, 25 deletions
diff --git a/plugins/check_load.c b/plugins/check_load.c
index cdb368a9..d1bb30a4 100644
--- a/plugins/check_load.c
+++ b/plugins/check_load.c
@@ -1,31 +1,31 @@
1/***************************************************************************** 1/*****************************************************************************
2* 2*
3* Monitoring check_load plugin 3* Monitoring check_load plugin
4* 4*
5* License: GPL 5* License: GPL
6* Copyright (c) 1999-2007 Monitoring Plugins Development Team 6* Copyright (c) 1999-2007 Monitoring Plugins Development Team
7* 7*
8* Description: 8* Description:
9* 9*
10* This file contains the check_load plugin 10* This file contains the check_load plugin
11* 11*
12* This plugin tests the current system load average. 12* This plugin tests the current system load average.
13* 13*
14* 14*
15* This program is free software: you can redistribute it and/or modify 15* This program is free software: you can redistribute it and/or modify
16* it under the terms of the GNU General Public License as published by 16* it under the terms of the GNU General Public License as published by
17* the Free Software Foundation, either version 3 of the License, or 17* the Free Software Foundation, either version 3 of the License, or
18* (at your option) any later version. 18* (at your option) any later version.
19* 19*
20* This program is distributed in the hope that it will be useful, 20* This program is distributed in the hope that it will be useful,
21* but WITHOUT ANY WARRANTY; without even the implied warranty of 21* but WITHOUT ANY WARRANTY; without even the implied warranty of
22* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23* GNU General Public License for more details. 23* GNU General Public License for more details.
24* 24*
25* You should have received a copy of the GNU General Public License 25* You should have received a copy of the GNU General Public License
26* along with this program. If not, see <http://www.gnu.org/licenses/>. 26* along with this program. If not, see <http://www.gnu.org/licenses/>.
27* 27*
28* 28*
29*****************************************************************************/ 29*****************************************************************************/
30 30
31const char *progname = "check_load"; 31const char *progname = "check_load";
@@ -291,7 +291,6 @@ process_arguments (int argc, char **argv)
291} 291}
292 292
293 293
294
295static int 294static int
296validate_arguments (void) 295validate_arguments (void)
297{ 296{
@@ -312,7 +311,6 @@ validate_arguments (void)
312} 311}
313 312
314 313
315
316void 314void
317print_help (void) 315print_help (void)
318{ 316{
@@ -323,7 +321,7 @@ print_help (void)
323 321
324 printf (_("This plugin tests the current system load average.")); 322 printf (_("This plugin tests the current system load average."));
325 323
326 printf ("\n\n"); 324 printf ("\n\n");
327 325
328 print_usage (); 326 print_usage ();
329 327
@@ -331,15 +329,15 @@ print_help (void)
331 printf (UT_EXTRA_OPTS); 329 printf (UT_EXTRA_OPTS);
332 330
333 printf (" %s\n", "-w, --warning=WLOAD1,WLOAD5,WLOAD15"); 331 printf (" %s\n", "-w, --warning=WLOAD1,WLOAD5,WLOAD15");
334 printf (" %s\n", _("Exit with WARNING status if load average exceeds WLOADn")); 332 printf (" %s\n", _("Exit with WARNING status if load average exceeds WLOADn"));
335 printf (" %s\n", "-c, --critical=CLOAD1,CLOAD5,CLOAD15"); 333 printf (" %s\n", "-c, --critical=CLOAD1,CLOAD5,CLOAD15");
336 printf (" %s\n", _("Exit with CRITICAL status if load average exceed CLOADn")); 334 printf (" %s\n", _("Exit with CRITICAL status if load average exceed CLOADn"));
337 printf (" %s\n", _("the load average format is the same used by \"uptime\" and \"w\"")); 335 printf (" %s\n", _("the load average format is the same used by \"uptime\" and \"w\""));
338 printf (" %s\n", "-r, --percpu"); 336 printf (" %s\n", "-r, --percpu");
339 printf (" %s\n", _("Divide the load averages by the number of CPUs (when possible)")); 337 printf (" %s\n", _("Divide the load averages by the number of CPUs (when possible)"));
340 printf (" %s\n", "-n, --procs-to-show=NUMBER_OF_PROCS"); 338 printf (" %s\n", "-n, --procs-to-show=NUMBER_OF_PROCS");
341 printf (" %s\n", _("Number of processes to show when printing the top consuming processes.")); 339 printf (" %s\n", _("Number of processes to show when printing the top consuming processes."));
342 printf (" %s\n", _("NUMBER_OF_PROCS=0 disables this feature. Default value is 0")); 340 printf (" %s\n", _("NUMBER_OF_PROCS=0 disables this feature. Default value is 0"));
343 341
344 printf (UT_SUPPORT); 342 printf (UT_SUPPORT);
345} 343}
@@ -347,8 +345,8 @@ print_help (void)
347void 345void
348print_usage (void) 346print_usage (void)
349{ 347{
350 printf ("%s\n", _("Usage:")); 348 printf ("%s\n", _("Usage:"));
351 printf ("%s [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15 [-n NUMBER_OF_PROCS]\n", progname); 349 printf ("%s [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15 [-n NUMBER_OF_PROCS]\n", progname);
352} 350}
353 351
354#ifdef PS_USES_PROCPCPU 352#ifdef PS_USES_PROCPCPU