Posts Tagged ‘ ntp

ntpq timed out on freeBSD

I was running locally on a server and wanted to check in on ’s status. ntpq -p was not producing any output even though was running.

# ntpq -p
localhost: timed out, nothing received
***Request timed out

This is because I had the option “restrict default ignore” set in /etc/.conf. ntpq. This makes ntpd ignore EVERYTHING, even queries to the loopback interface. Ntpq queries ntpd over the loopback interface at 127.0.0.1. To allow these local queries, add:

 restrict 127.0.0.1

to /etc/ntp.conf, then also add restrict lines for your other upstream ntp servers.

restart ntpd:

/etc/rc.d/ntpd restart

Now ntpq -p will show you status of it’s peers

# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 dns3.untangle.c .INIT.          16 u    -   64    0    0.000    0.000   0.000
 mirror          .INIT.          16 u    -   64    0    0.000    0.000   0.000
 153.16.4.133    .INIT.          16 u    -   64    0    0.000    0.000   0.000

Staying on time in Debian

To stay on , you should really use . It is a daemon that runs all the and makes tiny changes to the system clock. All you need to do is install :

aptitude install ntp

after it’s installed, I encourage you to go over to http://www.pool.ntp.org/zone/@ and pick a pool in your continental zone. Debian has some defaults, and they are fine, i just like using the ntp pool. If you want to change where you are syncing to, open up /etc/ntp.conf and change the “server” lines.

nano /etc/ntp.conf

to manually sync Debian’s time, just install “ntpdate”

apt-get install ntpdate

run this:

-debian [a ntp server]