check_timeout.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #include <stdio.h>
  21. #include <unistd.h>
  22. int main(int argc, char **argv){
  23. if(argc==1){
  24. printf("Incorrect arguments supplied\n");
  25. printf("\n");
  26. printf("Plugin timeout tester for Nagios\n");
  27. printf("Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)\n");
  28. printf("Last Modified: 01-10-2000\n");
  29. printf("License: GPL\n");
  30. printf("\n");
  31. printf("Usage: %s <something>\n",argv[0]);
  32. printf("\n");
  33. printf("Options:\n");
  34. printf(" <something> = Anything at all...\n");
  35. printf("\n");
  36. printf("Notes:\n");
  37. printf("This 'plugin' doesn't do anything. It is designed to never exit and therefore\n");
  38. printf("provides an easy way of testing service and host check timeouts in Nagios.\n");
  39. printf("\n");
  40. return 0;
  41. }
  42. /* let's never leave here, okay? */
  43. while(1)
  44. sleep(1);
  45. return 0;
  46. }