@bannedfromcoding said:
@PJH said:I suggested using the client. If you want to run a local ntp server, then you probably want it on a machine that doesn't have 2500 aliases.
With NTP, you have two options.
You can launch ntpdate from a cronjob. It starts, gets current time from a server, sets system clock, and exits. It may leads to such niceties as clock going backwards, which may cause scheduled jobs to run twice, stuff to get processed out of order, and so on. It is not recommended, except if you are sure your software can deal with it.
Or, you can run ntpd. It's a resident program. It CAN be a server to other machines, but it's optional. It indeed binds to all the interfaces by default (but it is configurable with the "interfaces" command in /etc/ntp.conf - at least on the version installed at my production server, which's dated from 2008 apparently), because with UDP you have to open a port to receive replies, as there's no concept of "established connection".
Ntpd connects to some peer servers, dropping unstable ones from time to time, calculates an average, and then "gently" adjusts the clock towards the right time by making "a second" take a bit more or a bit less time. But always guaranteeing there's 60 seconds in a minute, and that clock never goes backwards. That's why it's the recommended solution.
Maybe it was just me, but I couldn't get it to work any differently with an interfaces line, one of the first things I checked.
Perhaps it ignores invalid ntpd.conf lines? Never gave me an error, still tried to bind to everything.
Aye, perhaps though I should have just run ntpdate - probably better than the answer I ended up using - a script along the lines of 'date `ssh mainserver date`' with a particular date mode.
@Cassidy said:
@DaedalusRaistlin said:
@PJH said:Purely out of interest, what problem was 2500 aliases the solution for?
2500 IP addresses, of course ;)
You work in a datacentre, or a hosting company - something of that ilk?
I've seen large numbers of IP aliases bound to one (or several) NICs in hosting centres to separate out customer websites/virtual servers. Not sure if this is the case, mind.
Heh, nope - we used to have "only" 2200 IPs on one server. Now we've upgraded to 5000ish IPs on two servers. We have some very particular needs :P