Back to index

nagios-plugins  1.4.16
check_timeout.c
Go to the documentation of this file.
00001 /*****************************************************************************
00002  *
00003  * CHECK_TIMEOUT.C
00004  *
00005  * Program: Plugin timeout tester for Nagios
00006  * License: GPL
00007  * Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)
00008  *
00009  * Last Modified: 01-10-2000
00010  *
00011  * Command line: CHECK_TIMEOUT <something..>
00012  *
00013  * Description:
00014  * This 'plugin' - if you want to call it that - doesn't do anything.  It
00015  * just stays in a loop forever and never exits, and is therefore useful for
00016  * testing service and host check timeouts in Nagios.  You must supply at
00017  * least one argument on the command line in order to activate the loop.
00018  *
00019  ****************************************************************************/
00020 
00021 #include <stdio.h>
00022 #include <unistd.h>
00023 
00024 
00025 int main(int argc, char **argv){
00026 
00027        if(argc==1){
00028               printf("Incorrect arguments supplied\n");
00029               printf("\n");
00030               printf("Plugin timeout tester for Nagios\n");
00031               printf("Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)\n");
00032               printf("Last Modified: 01-10-2000\n");
00033               printf("License: GPL\n");
00034               printf("\n");
00035               printf("Usage: %s <something>\n",argv[0]);
00036               printf("\n");
00037               printf("Options:\n");
00038               printf(" <something> = Anything at all...\n");
00039               printf("\n");
00040               printf("Notes:\n");
00041               printf("This 'plugin' doesn't do anything.  It is designed to never exit and therefore\n");
00042               printf("provides an easy way of testing service and host check timeouts in Nagios.\n");
00043               printf("\n");
00044               return 0;
00045                 }
00046 
00047        /* let's never leave here, okay? */
00048        while(1)
00049               sleep(1);
00050 
00051        return 0;
00052         }
00053 
00054 
00055