Syncing ntpd and FreeSWITCH Clock on CentOS

While doing some auditing of servers after reboot, I found that ntpd was not running and that system time was off.

$ /etc/init.d/ntpd status
ntpd is stopped

This meant that freeswitch's time was also likely to be incorrect. I verified by entering the following freeswitch command:

$ fs_cli -x strftime
2013-08-31 05:23:18

After confirming that the system clock was out of sync, I executed the following commands in order to sync the system time with a known good pool, start ntpd with the corrected time, and then force freeswitch to sync with the updated system time:

$ sudo /sbin/ntpdate 0.north-america.pool.ntp.org
31 Aug 05:24:20 ntpdate[13450]: step time server 208.75.88.4 offset 25202.399733 sec

To start ntpd:

$ sudo /etc/init.d/ntpd start
Starting ntpd:                                             [  OK  ]

And finally, sync freeswitch with the corrected system time:

$ fs_cli -x 'fsctl sync_clock'
+OK clock synchronized

Further related information:

Tags

 Linux  Freeswitch  Voip  Ntpd  Centos