Xymon Mailing List Archive search

BUG: ntpdate command used in Xymon takes 2+ seconds each in RHEL 7 (with ntp 4.2.6+)

list Jeremy Laidman
Tue, 29 Sep 2015 10:50:14 +1000
Message-Id: <CAAnki7ADwKG3QF9LgiOAiUd9vZzim=user-03acd60590a1@xymon.invalid>

On 25 September 2015 at 23:07, Matt Vander Werf <user-07704c41c3ad@xymon.invalid> wrote:
<bump>

Any response to this e-mail? Just wanted to make sure it wasn't missed....
In the mean time, here's a work-around you could use.

First create a script named /usr/local/bin/xymon-ntpdate:

#!/bin/sh
while [ "$2" ]; do shift; done
ntpdate -p 1 -u -q $1

Now, define NTPDATE=/usr/local/bin/xymon-ntpdate

This script simply throws away all of the switches, and only keeps the IP
address given by xymonnet, adding its own parameters as required.

You could probably squeeze this into NTPDATE definition, something like
this (untested):

NTPDATE="sh -c 'while [ .$1 != . ]; do shift; done; ntpdate -p 1 -u -q $1'"

I'd go with a separate script.

To be honest, I don't really know why the parameters were hard-coded into
xymonnet in the first place, and not defined in NTPDATE.  Doing the latter
would make it much easier to tune for the environment or substitute a
different command with completely different parameters.

Cheers
Jeremy