Figuring out the ntp(date) check
Carl Melgaard
Carl.Melgaard at STAB.RM.DK
Wed Aug 25 12:55:21 CEST 2010
Hi,
I was trying to figure out, how the ntp-check works, as I sometimes get a "no server suitable for synchronization" error when performing this check.
Im not much of a C-coder, so I have why this line is triggered in the code from bbtest-net.c below:
void run_ntp_service(service_t *service)
{
testitem_t *t;
char cmd[1024];
char *p;
char cmdpath[PATH_MAX];
p = xgetenv("NTPDATE");
strcpy(cmdpath, (p ? p : "ntpdate"));
for (t=service->items; (t); t = t->next) {
if (!t->host->dnserror) {
sprintf(cmd, "%s -u -q -p 2 %s 2>&1", cmdpath, ip_to_test(t->host));
t->open = (run_command(cmd, "no server suitable for synchronization", t->banner, 1, extcmdtimeout) == 0);
}
}
}
Can anyone explain under what conditions that phrase occurs?
Regards,
Carl Melgaard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20100825/9ce7dd26/attachment.html>
More information about the Xymon
mailing list