Network Time (ntp): Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Our ntp servers are: | |||
Castle 69.55.230.2 | |||
I2B 69.55.229.2 | |||
# see if its connected: | # see if its connected: | ||
Latest revision as of 15:36, 5 August 2015
Our ntp servers are:
Castle 69.55.230.2 I2B 69.55.229.2
- see if its connected:
- [root@quar1 /vz/private]# ntpq -pn
- ntpq: read: Connection refused
- not running
- start it: [root@quar1 /vz/private]# service ntpd start
Starting ntpd: [ OK ]
- Query the NTP Server to see if it is paired [root@quar1 /vz/private]# ntpq -pn remote refid st t when poll reach delay offset jitter
10.1.4.5 66.187.233.4 2 u 4 64 1 0.317 876558. 0.000
- [root@quar1 /vz/private]# date Thu Oct 11 10:58:05 PDT 2012
- time is 11:13
that output from ntpq is deceiving- we're syncing connected. you want to see a * or + next to it (ex on mail):
- mail /usr/local/www/scripts# ntpq -pn
remote refid st t when poll reach delay offset jitter ============================================================================== *66.187.233.4 .CDMA. 1 u 550 1024 377 75.159 -0.613 0.100 217.204.76.170 0.0.0.0 16 u - 1024 0 0.000 0.000 4000.00 64.112.189.11 0.0.0.0 16 u - 1024 0 0.000 0.000 4000.00 66.69.112.130 0.0.0.0 16 u - 1024 0 0.000 0.000 4000.00 +80.85.129.25 193.79.237.14 2 u 624 1024 377 147.067 -0.291 0.149
(btw, if at least one is not + or * our ENTIRE network is off since all boxes sync to mail. edit /etc/ntp.conf to add servers)
see: http://doc.ntp.org/4.1.1/ntpq.htm
so its not connecting to our ntpd on mail (10.1.4.5)
and this is likely cause of the large time gap (offset 876558.) so we fix it:
- [root@quar1 /vz/private]# date -s "11:17:00"
Thu Oct 11 11:17:00 PDT 2012
- [root@quar1 /vz/private]# ntpq -pn
remote refid st t when poll reach delay offset jitter ============================================================================== 10.1.4.5 66.187.233.4 2 u 1029 64 0 0.000 0.000 4000.00
no offset but not connected. give it some time...
- [root@quar1 /vz/private]# sleep 300; ntpq -pn
remote refid st t when poll reach delay offset jitter ============================================================================== *10.1.4.5 66.187.233.4 2 u 44 64 37 0.304 19234.8 0.649
Yay, done.