My main Solaris server has an issue with its battery and thus I lose around 20 seconds per day.
Currently I am using rdate once in the morning to synchronise the time. Which approach should I use until I can change the battery on a weekend? Should I switch from rdate to ntp?
The machine runs plenty of cronjobs and thus I need to ensure that everything is started even when the time is changed.
Asked
Active
Viewed 234 times
0
Dennis Williamson
- 60,515
- 14
- 113
- 148
weismat
- 343
- 3
- 16
1 Answers
2
You should definitely run ntpd. Not only it automatically synchronizes with one or several servers, if you leave it running for a while, it calculates a correction factor for your hardware clock and can keep quite accurate time even if you lose connectivity to your time server(s).
The main issue with rdate however that it sets the correct time immediately. Suppose it's 10:30, but your server's clock shows 10:25. If you set the time, you effectively lose 5 minutes. NTP on the other hand adjusts time gradually.
Prof. Moriarty
- 870
- 8
- 12
-
To clarify that second comment: You (usually) want the time to be updated immediately at first, especially in your case where it's likely to be so incorrect. So the init script for ntpd should run rdate once to "jump" to the right time and then run ntpd to keep it in sync. – Adam Apr 28 '10 at 08:00
-
Exactly, sorry I wasn't clear on that. – Prof. Moriarty Apr 28 '10 at 08:43