How can I query NTPD on my Omnia?

Hi, I have configured my router to set it’s time via NTP and also to serve time via NTP in the LuCI interface. But I can’t see any way to view the status of NTP. Something like ‘ntpq -p’ or ‘chronyc sources’ usually provides something similar to:

duncan@raspberrypi:/$ ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
-ntp.teaparty.ne 81.2.117.235 2 u 219 256 377 8.160 3.235 0.131
*85.199.214.101 .GPS. 1 u 35 64 377 9.787 1.740 0.221
+ntp1.wirehive.n 195.66.241.3 2 u 252 256 377 12.877 0.935 0.333
+elite7hackers.n 213.136.0.252 2 u 221 256 377 19.417 2.025 0.254
duncan@raspberrypi:/$

or

[root@laptop ~]# chronyc sources
210 Number of sources = 5
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^- gateway 3 7 377 105 -219us[ -855us] +/- 102ms
^* server1.quickdrivingtest> 1 7 377 38 -2516us[-3187us] +/- 12ms
^+ 85.199.214.101 1 7 377 41 -1437us[-2107us] +/- 11ms
^? y.ns.gin.ntt.net 2 8 100 23m -480us[-2361us] +/- 91ms
^+ ntp2.owennelson.co.uk 2 7 377 107 -1768us[-2403us] +/- 29ms
[root@laptop ~]#

How do I query the status of NTP on my router? Otherwise I’ve got no way to measure the offset of the clock running on the router, or see the quality of the NTP sources it is using.

Thanks, D

opkg install ntp-utils

then use can use “ntpq -p” on Turris as well.

Thanks, but I get the following:

root@turris:~# opkg install ntp-utils
Unknown package 'ntp-utils'.
Collected errors:
 * opkg_install_cmd: Cannot install package ntp-utils.
root@turris:~# 

then you have to do:

opkg update

before that.

1 Like

Cheers - I’m a yum/dnf user so was a bit thrown initially. After a bit of digging I figured the same solution as you.

Now I have ntp-utils installed, however, I am getting:

root@turris:~# ntpq -p
localhost: timed out, nothing received
***Request timed out
root@turris:~# 

Nevermind, nevermind. Sorry - managed to get myself there.

root@turris:~# opkg install ntpd
root@turris:~# /etc/init.d/sysntpd disable
root@turris:~# /etc/init.d/sysntpd stop
root@turris:~# /etc/init.d/ntpd enable
root@turris:~# /etc/init.d/ntpd start
root@turris:~# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+85.199.214.99 ( .GPS.            1 u   42   64    7   22.513    7.966   9.088
*85.199.214.100  .GPS.            1 u   50   64    7   19.891    7.873   9.615
+ntp1.wirehive.n 195.66.241.3     2 u   52   64    7   24.480    8.059  10.392
+85.199.213.50   85.199.214.101   2 u   47   64    7   16.090    5.079   7.515

The reason is likely explained here:

By default, busybox-ntpd, can supply both a client for setting time, and a server for supplying time to the local net. This is installed out of the box and should take care of most time syncing needs. It doesnt support advanced features like query, so the server cannot be monitored from other systems like Nagios.

1 Like