diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-09-17 23:15:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-17 23:15:59 +0200 |
commit | d3e07d2b5734149c1314cb98b48dd1adebd62686 (patch) | |
tree | a924b49927ae1925a7e0893d31e0c9c6abd3228e /plugins/check_ntp.c | |
parent | 495c4c9adfa482303b31cdac7d28adda82d2d2ed (diff) | |
parent | 2ddc75e69db5a3dd379c896d8420c9af20ec1cee (diff) | |
download | monitoring-plugins-d3e07d2.tar.gz |
Merge branch 'master' into dev/check_ssh-patches
Diffstat (limited to 'plugins/check_ntp.c')
-rw-r--r-- | plugins/check_ntp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c index 8b776ba1..36146505 100644 --- a/plugins/check_ntp.c +++ b/plugins/check_ntp.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * | 10 | * |
11 | * This file contains the check_ntp plugin | 11 | * This file contains the check_ntp plugin |
12 | * | 12 | * |
13 | * This plugin to check ntp servers independant of any commandline | 13 | * This plugin to check ntp servers independent of any commandline |
14 | * programs or external libraries. | 14 | * programs or external libraries. |
15 | * | 15 | * |
16 | * | 16 | * |
@@ -79,7 +79,7 @@ typedef struct { | |||
79 | /* this structure holds data about results from querying offset from a peer */ | 79 | /* this structure holds data about results from querying offset from a peer */ |
80 | typedef struct { | 80 | typedef struct { |
81 | time_t waiting; /* ts set when we started waiting for a response */ | 81 | time_t waiting; /* ts set when we started waiting for a response */ |
82 | int num_responses; /* number of successfully recieved responses */ | 82 | int num_responses; /* number of successfully received responses */ |
83 | uint8_t stratum; /* copied verbatim from the ntp_message */ | 83 | uint8_t stratum; /* copied verbatim from the ntp_message */ |
84 | double rtdelay; /* converted from the ntp_message */ | 84 | double rtdelay; /* converted from the ntp_message */ |
85 | double rtdisp; /* converted from the ntp_message */ | 85 | double rtdisp; /* converted from the ntp_message */ |
@@ -100,7 +100,7 @@ typedef struct { | |||
100 | /* NB: not necessarily NULL terminated! */ | 100 | /* NB: not necessarily NULL terminated! */ |
101 | } ntp_control_message; | 101 | } ntp_control_message; |
102 | 102 | ||
103 | /* this is an association/status-word pair found in control packet reponses */ | 103 | /* this is an association/status-word pair found in control packet responses */ |
104 | typedef struct { | 104 | typedef struct { |
105 | uint16_t assoc; | 105 | uint16_t assoc; |
106 | uint16_t status; | 106 | uint16_t status; |
@@ -575,7 +575,7 @@ double jitter_request(int *status){ | |||
575 | } | 575 | } |
576 | } | 576 | } |
577 | } | 577 | } |
578 | if(verbose) printf("%d candiate peers available\n", num_candidates); | 578 | if(verbose) printf("%d candidate peers available\n", num_candidates); |
579 | if(verbose && syncsource_found) printf("synchronization source found\n"); | 579 | if(verbose && syncsource_found) printf("synchronization source found\n"); |
580 | if(! syncsource_found){ | 580 | if(! syncsource_found){ |
581 | *status = STATE_UNKNOWN; | 581 | *status = STATE_UNKNOWN; |
@@ -597,7 +597,7 @@ double jitter_request(int *status){ | |||
597 | /* By spec, putting the variable name "jitter" in the request | 597 | /* By spec, putting the variable name "jitter" in the request |
598 | * should cause the server to provide _only_ the jitter value. | 598 | * should cause the server to provide _only_ the jitter value. |
599 | * thus reducing net traffic, guaranteeing us only a single | 599 | * thus reducing net traffic, guaranteeing us only a single |
600 | * datagram in reply, and making intepretation much simpler | 600 | * datagram in reply, and making interpretation much simpler |
601 | */ | 601 | */ |
602 | /* Older servers doesn't know what jitter is, so if we get an | 602 | /* Older servers doesn't know what jitter is, so if we get an |
603 | * error on the first pass we redo it with "dispersion" */ | 603 | * error on the first pass we redo it with "dispersion" */ |