[Nagiosplug-devel] Flight 1.4.8, ready for boarding

Holger Weiss holger at CIS.FU-Berlin.DE
Tue Apr 3 19:14:43 CEST 2007


* sean finney <seanius at seanius.net> [2007-04-03 08:29]:
> > Please also note that I still can't get the jitter on my sun box
> > (solaris.beaubien.net). According to Holger this could be due to the
> > byte order, though running check_ntp on that sun box still give me the
> > same results (is that expected?).

I don't know why getting the jitter doesn't work with your box (and
quite a few other servers I tried).  The problem I mentioned was that
jitter_request() will issue a WARNING because it doesn't detect the
synchronizatin source if check_ntp is run on a big-endian system.

> i wouldn't be surprised if it were either a byte-order issue or a 32/64
> bit thing.  i'd done my best to properly use ntoh[sl]/hton[sl] where
> appropriate, but it's possible i've missed something, or that there's a
> mistake buriend in all the bit-mangling going on.

The sync source is found using the value of PEER_SEL(peers[i].status),
where peers[i].status (which is a 16-bit value) is read without a prior
ntohs(3).  So, on little-endian, the bytes are the wrong way round.
However, PEER_SEL() reads the low-order byte of the status field, while
it should read the high-order byte.  Therefore, it actually works on
little-endian, but not on big-endian systems.  I'll fix that in a
minute.

Holger

-- 
PGP fingerprint:  F1F0 9071 8084 A426 DD59  9839 59D3 F3A1 B8B5 D3DE




More information about the Devel mailing list