NTP

From VentureResearchWiki
Jump to navigation Jump to search

NTP Servers[edit | edit source]

time[1-3].ventureresearch.com[edit | edit source]

time1 through time3 are set up on vm-linux-prod, embedded-prod, embedded-dev respectively. These should be used for any external device deployments.

You can use this ntp.conf:

# This is the most basic ntp configuration file
# The driftfile must remain in a place specific to this
# machine - it records the machine specific clock error
driftfile /etc/ntp.drift
# This obtains a random server which will be close
# (in IP terms) to the machine.  Add other servers
# as required, or change this.
server time1.ventureresearch.com
server time2.ventureresearch.com
server time3.ventureresearch.com
# Using local hardware clock as fallback
# Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself
server 127.127.1.0
fudge 127.127.1.0 stratum 14
# Defining a default security setting
restrict default
# loosen up the restrictions
tos maxdist 10

unit updating[edit | edit source]

  • Check the current offset:
ntpdate -uq pool.ntp.org 
  • Install ntpq:
[ ! -x /usr/bin/ntpq ] && opkg install ntp-bin
  • Look at peers - if it is only LOCAL or there is one server that is bad!
ntpq -p
  • Copy new ntp.conf file:
scp venture@10.19.6.1:~/ntp.conf.cellular /etc/ntp.conf
  • Restart ntp:
/etc/init.d/ntpd restart
  • Check peers again, look for VR IPs (216.74..., 209.253...)
ntpq -p
  • After a minute or three, check time again, it should match.
ntpdate -uq  pool.ntp.org