[Nagiosplug-checkins] CVS: nagiosplug/plugins check_load.c,1.2,1.3
Karl DeBisschop
kdebisschop at users.sourceforge.net
Sun Oct 20 20:56:36 CEST 2002
- Previous message: [Nagiosplug-checkins] CVS: nagiosplug/plugins check_snmp.c,1.7,1.8
- Next message: [Nagiosplug-checkins] CVS: nagiosplug/plugins check_pop.c,1.1.1.1,NONE check_imap.c,1.1.1.1,NONE check_nntp.c,1.1.1.1,NONE check_ftp.c,1.1.1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory usw-pr-cvs1:/tmp/cvs-serv29067/plugins
Modified Files:
check_load.c
Log Message:
remove broken call_getopt
Index: check_load.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_load.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** check_load.c 18 Oct 2002 05:55:56 -0000 1.2
--- check_load.c 21 Oct 2002 03:55:37 -0000 1.3
***************
*** 227,256 ****
return validate_arguments ();
if (wload1 < 0 && is_nonnegative (argv[c]))
! wload1 = atof (argv[c]);
if (c == argc)
return validate_arguments ();
if (cload1 < 0 && is_nonnegative (argv[c]))
! cload1 = atof (argv[c]);
if (c == argc)
return validate_arguments ();
if (wload5 < 0 && is_nonnegative (argv[c]))
! wload5 = atof (argv[c]);
if (c == argc)
return validate_arguments ();
if (cload5 < 0 && is_nonnegative (argv[c]))
! cload5 = atof (argv[c]);
if (c == argc)
return validate_arguments ();
if (wload15 < 0 && is_nonnegative (argv[c]))
! wload15 = atof (argv[c]);
if (c == argc)
return validate_arguments ();
if (cload15 < 0 && is_nonnegative (argv[c]))
! cload15 = atof (argv[c]);
return validate_arguments ();
--- 227,256 ----
return validate_arguments ();
if (wload1 < 0 && is_nonnegative (argv[c]))
! wload1 = atof (argv[c++]);
if (c == argc)
return validate_arguments ();
if (cload1 < 0 && is_nonnegative (argv[c]))
! cload1 = atof (argv[c++]);
if (c == argc)
return validate_arguments ();
if (wload5 < 0 && is_nonnegative (argv[c]))
! wload5 = atof (argv[c++]);
if (c == argc)
return validate_arguments ();
if (cload5 < 0 && is_nonnegative (argv[c]))
! cload5 = atof (argv[c++]);
if (c == argc)
return validate_arguments ();
if (wload15 < 0 && is_nonnegative (argv[c]))
! wload15 = atof (argv[c++]);
if (c == argc)
return validate_arguments ();
if (cload15 < 0 && is_nonnegative (argv[c]))
! cload15 = atof (argv[c++]);
return validate_arguments ();
***************
*** 264,273 ****
validate_arguments (void)
{
! if ((wload1 > cload1) || (wload5 > cload5) || (wload15 > cload15)) {
! printf
! ("Inconsistence in parameters: \"warning load\" greater than \"critical load\".\n");
! return STATE_UNKNOWN;
! }
!
return OK;
}
--- 264,285 ----
validate_arguments (void)
{
! if (wload1 < 0)
! usage ("Warning threshold for 1-minute load average is not specified\n");
! if (wload5 < 0)
! usage ("Warning threshold for 5-minute load average is not specified\n");
! if (wload15 < 0)
! usage ("Warning threshold for 15-minute load average is not specified\n");
! if (cload1 < 0)
! usage ("Critical threshold for 1-minute load average is not specified\n");
! if (cload5 < 0)
! usage ("Critical threshold for 5-minute load average is not specified\n");
! if (cload15 < 0)
! usage ("Critical threshold for 15-minute load average is not specified\n");
! if (wload1 > cload1)
! usage ("Parameter inconsistency: 1-minute \"warning load\" greater than \"critical load\".\n");
! if (wload5 > cload5)
! usage ("Parameter inconsistency: 5-minute \"warning load\" greater than \"critical load\".\n");
! if (wload15 > cload15)
! usage ("Parameter inconsistency: 15-minute \"warning load\" greater than \"critical load\".\n");
return OK;
}
- Previous message: [Nagiosplug-checkins] CVS: nagiosplug/plugins check_snmp.c,1.7,1.8
- Next message: [Nagiosplug-checkins] CVS: nagiosplug/plugins check_pop.c,1.1.1.1,NONE check_imap.c,1.1.1.1,NONE check_nntp.c,1.1.1.1,NONE check_ftp.c,1.1.1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Commits
mailing list