Sync Layer7 Server Time with NTP (Network Time Protocol) Server
search cancel

Sync Layer7 Server Time with NTP (Network Time Protocol) Server

book

Article ID: 132025

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

How can I sync the Layer7 server time with the NTP (Network Time Protocol) server?

Environment

All supported versions of the API Gateway

Resolution

Here's how you force the Layer7/NTP sync: 
------------------------------------ 
1) #vi /etc/sysconfig/ntpd 

At the top of the file there will be an OPTIONS variable with something like: 
OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid" 

2) Modify it and add the -x parameter: 
OPTION="-x -u ntp:ntp -p /var/run/ntpd.pid" 

3) Then restart the service: 
#service ntpd restart 
OR
#service ntpd stop
#service ntpd start
------------------------------------ 
This will force the NTP daemon to re-sync every time you restart the service. You can either leave the -x in there permanently or just add it when you need it. 

Additional Information

If the server is still out of sync by a minute or so, run the following commands:

service ntpd stop
ntpdate -v server.domain.com
service ntpd start

Replace 'server.domain.com' with the appropriate NTP server name. This command should force a clock update.