summaryrefslogtreecommitdiffstats
path: root/plugins/check_ntp_time.c
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2007-12-04 12:24:48 +0000
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2007-12-04 12:24:48 +0000
commit084a9b444fab26b756bc2bf751e93c5494b926f4 (patch)
treea7d19f36f0c8d5100d05677e9bc432ab6914db6c /plugins/check_ntp_time.c
parent79cc962eb8c17d849e7c698e25aed25938a0efae (diff)
downloadmonitoring-plugins-084a9b444fab26b756bc2bf751e93c5494b926f4.tar.gz
Cleanups only
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/branches/dermoth_ntp_rework@1842 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_ntp_time.c')
-rw-r--r--plugins/check_ntp_time.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/check_ntp_time.c b/plugins/check_ntp_time.c
index 042d3037..ad7f6c4b 100644
--- a/plugins/check_ntp_time.c
+++ b/plugins/check_ntp_time.c
@@ -356,13 +356,13 @@ double offset_request(const char *host, int *status){
356 ai_tmp = ai_tmp->ai_next; 356 ai_tmp = ai_tmp->ai_next;
357 } 357 }
358 358
359 /* now do AVG_NUM checks to each host. we stop before timeout/2 seconds 359 /* now do AVG_NUM checks to each host. We stop before timeout/2 seconds
360 * have passed in order to ensure post-processing and jitter time. */ 360 * have passed in order to ensure post-processing and jitter time. */
361 now_time=start_ts=time(NULL); 361 now_time=start_ts=time(NULL);
362 while(servers_completed<num_hosts && now_time-start_ts <= socket_timeout/2){ 362 while(servers_completed<num_hosts && now_time-start_ts <= socket_timeout/2){
363 /* loop through each server and find each one which hasn't 363 /* loop through each server and find each one which hasn't
364 * been touched in the past second or so and is still lacking 364 * been touched in the past second or so and is still lacking
365 * some responses. for each of these servers, send a new request, 365 * some responses. For each of these servers, send a new request,
366 * and update the "waiting" timestamp with the current time. */ 366 * and update the "waiting" timestamp with the current time. */
367 one_written=0; 367 one_written=0;
368 now_time=time(NULL); 368 now_time=time(NULL);
@@ -586,11 +586,11 @@ void print_help(void){
586 586
587 printf ("Copyright (c) 2006 Sean Finney\n"); 587 printf ("Copyright (c) 2006 Sean Finney\n");
588 printf (COPYRIGHT, copyright, email); 588 printf (COPYRIGHT, copyright, email);
589
590 printf ("%s\n", _("This plugin checks the clock offset with the ntp server"));
591 589
592 printf ("\n\n"); 590 printf ("%s\n", _("This plugin checks the clock offset with the ntp server"));
593 591
592 printf ("\n\n");
593
594 print_usage(); 594 print_usage();
595 printf (_(UT_HELP_VRSN)); 595 printf (_(UT_HELP_VRSN));
596 printf (_(UT_HOST_PORT), 'p', "123"); 596 printf (_(UT_HOST_PORT), 'p', "123");
@@ -625,8 +625,8 @@ void print_help(void){
625void 625void
626print_usage(void) 626print_usage(void)
627{ 627{
628 printf (_("Usage:")); 628 printf (_("Usage:"));
629 printf(" %s -H <host> [-w <warn>] [-c <crit>] [-W <warn>] [-C <crit>]\n", progname); 629 printf(" %s -H <host> [-w <warn>] [-c <crit>] [-W <warn>] [-C <crit>]\n", progname);
630 printf(" [-j <warn>] [-k <crit>] [-v verbose]\n"); 630 printf(" [-j <warn>] [-k <crit>] [-v verbose]\n");
631} 631}
632 632