[Nagiosplug-checkins] SF.net SVN: nagiosplug: [1842] nagiosplug/branches/dermoth_ntp_rework
dermoth at users.sourceforge.net
dermoth at users.sourceforge.net
Tue Dec 4 13:24:49 CET 2007
Revision: 1842
http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=1842&view=rev
Author: dermoth
Date: 2007-12-04 04:24:48 -0800 (Tue, 04 Dec 2007)
Log Message:
-----------
Cleanups only
Modified Paths:
--------------
nagiosplug/branches/dermoth_ntp_rework/NEWS
nagiosplug/branches/dermoth_ntp_rework/plugins/check_ntp_peer.c
nagiosplug/branches/dermoth_ntp_rework/plugins/check_ntp_time.c
Modified: nagiosplug/branches/dermoth_ntp_rework/NEWS
===================================================================
--- nagiosplug/branches/dermoth_ntp_rework/NEWS 2007-12-04 12:17:50 UTC (rev 1841)
+++ nagiosplug/branches/dermoth_ntp_rework/NEWS 2007-12-04 12:24:48 UTC (rev 1842)
@@ -9,7 +9,7 @@
and the offset is unavailable, will return UNKNOWN as well.
NOTE: If jitter thresholds are specified as integers it will return CRITICAL if jitter
is "-1" as the default range starts at 0. See Examples in --help output.
- Merge two new checks that deprecates check_ntp: check_ntp_peer and check_ntp_time.
+ Merge two new checks that deprecates check_ntp: check_ntp_peer and check_ntp_time.
You should read the --help output so see which one is suitable for you. check_ntp_peer
implement stratum thresholds support (feature request #1703823).
@@ -17,9 +17,9 @@
Fix check_http buffer overflow vulnerability when following HTTP redirects
check_http now explicitly asks HTTP/1.1 servers to close the connection
after completion of the response
- Check_ldaps' guessing which secure method to use (starttls vs. ssl on connect)
+ Check_ldaps' guessing which secure method to use (starttls vs. ssl on connect)
is now deprecated. See --help for further information.
- Check_disk now calls stat() on all filesystems to check. (Old: only the ones selected using -p)
+ Check_disk now calls stat() on all filesystems to check. (Old: only the ones selected using -p)
A meaningful error message (eg "Stale NFS Handle") is printed if stat fails.
New check_disk option -L: Only check local filesystems, but call stat() on remote ones, too.
Thus accessibility of remote filesystems can be checked without any threshold comparison.
@@ -38,7 +38,7 @@
Fix possible check_icmp bus errors on some (non-x86/AMD64) platforms
Fix check_smtp's handling of multiple-packet server responses
WARNING: Fix for negate which may break existing commands:
- - stop evaluating command line options through shell twice
+ - stop evaluating command line options through shell twice
- enforce a full path for the command to run
The "negate" utility can now remap custom states
Check_radius now supports radiusclient-ng
@@ -113,7 +113,7 @@
SSL plugins work with gnutls as well as OpenSSL
check_mysql_query added to run arbitrary SQL commands, with threshold checking
libtool now required for development systems
- Notice: check_udp (compiled from check_udp.c) will be deprecated in the next release.
+ Notice: check_udp (compiled from check_udp.c) will be deprecated in the next release.
check_udp2 should be used instead and will be renamed to check_udp
1.4.2
Modified: nagiosplug/branches/dermoth_ntp_rework/plugins/check_ntp_peer.c
===================================================================
--- nagiosplug/branches/dermoth_ntp_rework/plugins/check_ntp_peer.c 2007-12-04 12:17:50 UTC (rev 1841)
+++ nagiosplug/branches/dermoth_ntp_rework/plugins/check_ntp_peer.c 2007-12-04 12:24:48 UTC (rev 1842)
@@ -181,7 +181,7 @@
char *tmpvarlist=NULL, *tmpkey=NULL, *value=NULL;
int last=0;
- /* The following code require a non-empty varlist */
+ /* The following code require a non-empty varlist */
if(strlen(varlist) == 0)
return NULL;
@@ -279,7 +279,7 @@
} while(req.op&REM_MORE);
/* first, let's find out if we have a sync source, or if there are
- * at least some candidates. in the case of the latter we'll issue
+ * at least some candidates. In the latter case we'll issue
* a warning but go ahead with the check on them. */
for (i = 0; i < npeers; i++){
if (PEER_SEL(peers[i].status) >= PEER_INCLUDED){
@@ -302,7 +302,7 @@
/* Only query this server if it is the current sync source */
/* If there's no sync.peer, query all candidates and use the best one */
if (PEER_SEL(peers[i].status) >= min_peer_sel){
- if(verbose) printf("Getting offset, jitter and stratum for peer %.2x\n", ntohs(peers[i].assoc));
+ if(verbose) printf("Getting offset, jitter and stratum for peer %.2x\n", ntohs(peers[i].assoc));
asprintf(&data, "");
do{
setup_control_request(&req, OP_READVAR, 2);
@@ -335,7 +335,7 @@
getvar = "stratum,offset,dispersion";
i--;
continue;
- } else if(strlen(getvar)) {
+ } else if(strlen(getvar)) {
if(verbose) printf("Server didn't like dispersion either; will retrieve everything\n");
getvar = "";
i--;
@@ -541,7 +541,7 @@
int main(int argc, char *argv[]){
int result, offset_result, stratum;
- double offset=0, jitter=0;
+ double offset=0, jitter=0;
char *result_line, *perfdata_line;
if (process_arguments (argc, argv) == ERROR)
@@ -557,11 +557,11 @@
/* set socket timeout */
alarm (socket_timeout);
- /* This returns either OK or WARNING (See comment preceeding ntp_request) */
+ /* This returns either OK or WARNING (See comment preceeding ntp_request) */
result = ntp_request(server_address, &offset, &offset_result, &jitter, &stratum);
if(offset_result == STATE_UNKNOWN) {
- /* if there's no sync peer (this overrides ntp_request output): */
+ /* if there's no sync peer (this overrides ntp_request output): */
result = (quiet == 1 ? STATE_UNKNOWN : STATE_CRITICAL);
} else {
/* Be quiet if there's no candidates either */
@@ -602,11 +602,11 @@
}
if (do_jitter) {
asprintf(&result_line, "%s, jitter=%f", result_line, jitter);
- asprintf(&perfdata_line, "%s %s", perfdata_line, perfd_jitter(jitter));
+ asprintf(&perfdata_line, "%s %s", perfdata_line, perfd_jitter(jitter));
}
if (do_stratum) {
asprintf(&result_line, "%s, stratum=%i", result_line, stratum);
- asprintf(&perfdata_line, "%s %s", perfdata_line, perfd_stratum(stratum));
+ asprintf(&perfdata_line, "%s %s", perfdata_line, perfd_stratum(stratum));
}
printf("%s|%s\n", result_line, perfdata_line);
@@ -621,11 +621,11 @@
printf ("Copyright (c) 2006 Sean Finney\n");
printf (COPYRIGHT, copyright, email);
-
- printf ("%s\n", _("This plugin checks the selected ntp server"));
- printf ("\n\n");
-
+ printf ("%s\n", _("This plugin checks the selected ntp server"));
+
+ printf ("\n\n");
+
print_usage();
printf (_(UT_HELP_VRSN));
printf (_(UT_HOST_PORT), 'p', "123");
@@ -675,7 +675,7 @@
void
print_usage(void)
{
- printf (_("Usage:"));
- printf(" %s -H <host> [-w <warn>] [-c <crit>] [-W <warn>] [-C <crit>]\n", progname);
- printf(" [-j <warn>] [-k <crit>] [-v verbose]\n");
+ printf (_("Usage:"));
+ printf(" %s -H <host> [-w <warn>] [-c <crit>] [-W <warn>] [-C <crit>]\n", progname);
+ printf(" [-j <warn>] [-k <crit>] [-v verbose]\n");
}
Modified: nagiosplug/branches/dermoth_ntp_rework/plugins/check_ntp_time.c
===================================================================
--- nagiosplug/branches/dermoth_ntp_rework/plugins/check_ntp_time.c 2007-12-04 12:17:50 UTC (rev 1841)
+++ nagiosplug/branches/dermoth_ntp_rework/plugins/check_ntp_time.c 2007-12-04 12:24:48 UTC (rev 1842)
@@ -356,13 +356,13 @@
ai_tmp = ai_tmp->ai_next;
}
- /* now do AVG_NUM checks to each host. we stop before timeout/2 seconds
+ /* now do AVG_NUM checks to each host. We stop before timeout/2 seconds
* have passed in order to ensure post-processing and jitter time. */
now_time=start_ts=time(NULL);
while(servers_completed<num_hosts && now_time-start_ts <= socket_timeout/2){
/* loop through each server and find each one which hasn't
* been touched in the past second or so and is still lacking
- * some responses. for each of these servers, send a new request,
+ * some responses. For each of these servers, send a new request,
* and update the "waiting" timestamp with the current time. */
one_written=0;
now_time=time(NULL);
@@ -586,11 +586,11 @@
printf ("Copyright (c) 2006 Sean Finney\n");
printf (COPYRIGHT, copyright, email);
-
- printf ("%s\n", _("This plugin checks the clock offset with the ntp server"));
- printf ("\n\n");
-
+ printf ("%s\n", _("This plugin checks the clock offset with the ntp server"));
+
+ printf ("\n\n");
+
print_usage();
printf (_(UT_HELP_VRSN));
printf (_(UT_HOST_PORT), 'p', "123");
@@ -625,8 +625,8 @@
void
print_usage(void)
{
- printf (_("Usage:"));
- printf(" %s -H <host> [-w <warn>] [-c <crit>] [-W <warn>] [-C <crit>]\n", progname);
- printf(" [-j <warn>] [-k <crit>] [-v verbose]\n");
+ printf (_("Usage:"));
+ printf(" %s -H <host> [-w <warn>] [-c <crit>] [-W <warn>] [-C <crit>]\n", progname);
+ printf(" [-j <warn>] [-k <crit>] [-v verbose]\n");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list