summaryrefslogtreecommitdiffstats
path: root/contrib/check_timeout.c
diff options
context:
space:
mode:
authorEthan Galstad <egalstad@users.sourceforge.net>2002-02-28 06:42:51 +0000
committerEthan Galstad <egalstad@users.sourceforge.net>2002-02-28 06:42:51 +0000
commit44a321cb8a42d6c0ea2d96a1086a17f2134c89cc (patch)
treea1a4d9f7b92412a17ab08f34f04eec45433048b7 /contrib/check_timeout.c
parent54fd5d7022ff2d6a59bc52b8869182f3fc77a058 (diff)
downloadmonitoring-plugins-44a321cb8a42d6c0ea2d96a1086a17f2134c89cc.tar.gz
Initial revision
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'contrib/check_timeout.c')
-rw-r--r--contrib/check_timeout.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/contrib/check_timeout.c b/contrib/check_timeout.c
new file mode 100644
index 00000000..858bdfe9
--- /dev/null
+++ b/contrib/check_timeout.c
@@ -0,0 +1,55 @@
1/*****************************************************************************
2 *
3 * CHECK_TIMEOUT.C
4 *
5 * Program: Plugin timeout tester for Nagios
6 * License: GPL
7 * Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)
8 *
9 * Last Modified: 01-10-2000
10 *
11 * Command line: CHECK_TIMEOUT <something..>
12 *
13 * Description:
14 * This 'plugin' - if you want to call it that - doesn't do anything. It
15 * just stays in a loop forever and never exits, and is therefore useful for
16 * testing service and host check timeouts in Nagios. You must supply at
17 * least one argument on the command line in order to activate the loop.
18 *
19 ****************************************************************************/
20
21#include <stdio.h>
22#include <unistd.h>
23
24
25int main(int argc, char **argv){
26
27 if(argc==1){
28 printf("Incorrect arguments supplied\n");
29 printf("\n");
30 printf("Plugin timeout tester for Nagios\n");
31 printf("Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)\n");
32 printf("Last Modified: 01-10-2000\n");
33 printf("License: GPL\n");
34 printf("\n");
35 printf("Usage: %s <something>\n",argv[0]);
36 printf("\n");
37 printf("Options:\n");
38 printf(" <something> = Anything at all...\n");
39 printf("\n");
40 printf("Notes:\n");
41 printf("This 'plugin' doesn't do anything. It is designed to never exit and therefore\n");
42 printf("provides an easy way of testing service and host check timeouts in Nagios.\n");
43 printf("\n");
44 return 0;
45 }
46
47 /* let's never leave here, okay? */
48 while(1)
49 sleep(1);
50
51 return 0;
52 }
53
54
55