BUG System Time Sync

Joined
Apr 17, 2009
Messages
829
Reaction score
9
is there a good way to have your PiAF system sync time with a NTP server?
 

drsatch

New Member
Joined
Feb 25, 2008
Messages
41
Reaction score
0
I put this in a cron

rdate -s time-nw.nist.gov && hwclock --systohc
 

MyKroFt

Guru
Joined
Oct 31, 2008
Messages
659
Reaction score
3
it is not pre installed in the base cent OS ISO before piaf is loaded?
 
Joined
Apr 17, 2009
Messages
829
Reaction score
9
I have never messed with setting cron jobs. could someone give a noob like me some direction?
 

dswartz

Guru
Joined
Feb 17, 2009
Messages
1,056
Reaction score
0
don't mess with cron jobs, just set up ntp. like this:

yum install ntp
chkconfig ntp on
service ntp start

this should just work.
 

MyKroFt

Guru
Joined
Oct 31, 2008
Messages
659
Reaction score
3
ya, daemon mode is the best, it will use the pool source so a single time point dont get overloaded etc, and its all automagic :)

if not preinstalled in the base ISO, might want to have the piaf setup install it, a box without a good time reference does nobody any good.....
 

SpaethCo

Member
Joined
Jan 10, 2009
Messages
32
Reaction score
0
Exactly.

The NTP daemon syncs to an external clock by slightly adjusting the speed of the internal clock to speed up or slow down to match an external source, unless it is so far off that it has to step the clock. In most cases the ntpd daemon will only step the time once during startup and simply do tick adjustments from that point forward.

Stepping the clock is a what the cron job method does, and in certain scenarios it can have disastrous consequences. Stepping the clock is a hard reset of the time, which means that in certain circumstances the clock could be set backwards and the same second or few seconds of time could repeat. For anyone who has ever worked with a time-based transactional database, you will know why this is a really really bad idea™.
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
is there a good way to have your PiAF system sync time with a NTP server?

Yes, there is an easy way. Use the great web GUI Webmin, depending on which version of PiaF you are running, the System Time module will be under Hardware or one of the other menus. Here's a webpage called Setting the Time Straight on a PiaF server.

You should really take the time to find out ALL of the capabilities of Webmin. It will save you tons of headaches and command line work.
 

SpaethCo

Member
Joined
Jan 10, 2009
Messages
32
Reaction score
0
You should really take the time to find out ALL of the capabilities of Webmin. It will save you tons of headaches and command line work.
Webmin does some things right, and some things wrong. The implementation they have here for setting system time is somewhat of an industry worst practice for setting the time on a *nix-based machine.
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
Webmin does some things right, and some things wrong. The implementation they have here for setting system time is somewhat of an industry worst practice for setting the time on a *nix-based machine.

Why do you say that? You sync to an NTP server and set how often you want it to update plus you set the hardware clock also.
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
Okay I re-read the other posts and see where the problem is. Time transactional accounting. ntpd is the better way. It's not installed by default in PiaF? That would make a good addition.
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
I updated my webpage to reflect that which has been discussed here. Thanks for the great info.
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
This is a great forum with lots of good knowledgable members. I learn something new everyday.
 

drmurdoch

Member
Joined
May 26, 2008
Messages
576
Reaction score
11
I used Webmin. (wiki source)
Here's what I did for other newbs.

webmin.system.time.PIAF.set.time.time.server.sync.jpg

don't mess with cron jobs, just set up ntp. like this:

yum install ntp
chkconfig ntp on
service ntp start

this should just work.

I am going to try this if I have any troubles with how I did it.
Thanks.
 

Members online

Forum statistics

Threads
25,845
Messages
167,966
Members
19,265
Latest member
muneer
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top