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

Jeremy Laidman jlaidman at rebel-it.com.au
Tue Sep 29 02:50:14 CEST 2015


On 25 September 2015 at 23:07, Matt Vander Werf <mvanderw at nd.edu> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20150929/04d84b26/attachment.html>


More information about the Xymon mailing list