how to synch my clocks?
i have a few systems, none of the times match, most are within 15min which is bad but not death. another system is off by a few hrs and i don't have access to its bios screen.
what is an easy way to get the clocks in synch? i know ntp is out there but i don't want to start running another server. does ntp introduce security risks? maybe, maybe not, but i don't want to spend a weekend reading on it. hwclock seems to be a 'good enough' path. if once a month i need to correct it by 5 min, no big deal. can you share your tips on hwclock and any 'gotchas'. |
You could grab the correct time off a network clock and update the hardware clock in this one liner...
Code:
su - -c "ntpdate ntp.nasa.gov ; hwclock --systohc" Code:
ZONE="America/New_York" |
perfect! just what i needed. thanks!
|
Quote:
BZZZZZZZZZZZZZZZZZZZZZZZZZZZ. Incorrect answer. Actually not incorrect, but not wholly correct either. While the one-liner will work, for home systems you should NEVER point to a specific time server, particularly tier 1 systems like NASA or NIST. Those things get pounded, and if it keeps up, access is going to be restricted. The correct way to use time servers is through the pool system. This points you at a set of servers and the load is distributed so no one server gets swamped. It is the polite way to keep your clocks synchronized. So the correct answer here is: su - -c "ntpdate 0.us.pool.ntp.org ; hwclock --systohc" Of course you can adjust the pool server to reflect the country you live in. |
All times are GMT -5. The time now is 09:17 AM. |