# Is there a Chrony equivalent for 'ntpq ifstats'?

**URL:** <https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011>\
**Category:** Server operators\
**Created:** [August 6, 2025, 7:01am UTC](https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011 "2025-08-06T07:01:08Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisJ](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/chrisj/32/1822_2.png) [@ChrisJ](https://community.ntppool.org/u/ChrisJ)\
**Post date:** [August 6, 2025, 7:01am UTC](https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011/1 "2025-08-06T07:01:08Z")

</div>

Not strictly pool related but I;m hoping the knowledgable folk here may have some ideas…

I operate two public servers (both are in the pool). One runs NTPD the other uses CHRONYD. NTP has a nice command ‘ntpq ifstats’ that provides NTP request/response stats for each server interface / IP address combination. By sampling this every hour I can get a really good picture of the traffic per network including the IPv4 / IPv6 split. I’ve not been able to find anything similar for chrony though; am I missing something or does chrony simply not provide this kind of stats? Any thoughts on a (lightweight, simple to automate) mechanism to capture similar stats on the server that runs crony?

---

<div class="post-metadata">

**Author:** ![bjh21](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/bjh21/32/1181_2.png) [@bjh21](https://community.ntppool.org/u/bjh21)\
**Post date:** [August 6, 2025, 10:40am UTC](https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011/2 "2025-08-06T10:40:20Z")

</div>

The approach I take is to use iptables. I have a bunch of rules that match NTP on each address that my servers are listening on, and iptables then keeps track of how many packets hit each rule:

```auto
Chain ntp_in (1 references)
 pkts bytes target prot opt in out source destination
    0 0 all -- any any anywhere sntp.cam.ac.uk /* sntp */
2442K 186M all -- any any anywhere ntp0.cam.ac.uk /* cam */
 636M 48G all -- any any anywhere pool.ntp0.cam.ac.uk /* pool */
 583K 43M ntpcsx all -- any any anywhere please-update-config-to-use.ntp0.cam.ac.uk /* csx */
 244K 19M DROP all -- any any anywhere anywhere limit: above 20000/sec burst 20000 mode dstip

```

In my case, these numbers are then collected by CollectD and fed into our general metrics system, but you could doubtless feed them into whatever you’re currently doing with ifstats.

---

<div class="post-metadata">

**Author:** ![ChrisJ](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/chrisj/32/1822_2.png) [@ChrisJ](https://community.ntppool.org/u/ChrisJ)\
**Post date:** [August 6, 2025, 11:38am UTC](https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011/3 "2025-08-06T11:38:07Z")

</div>

Thanks, this seems promising. This server (cloud VM) uses firewalld, which I believe uses iptables, so I just need to figure out how to to set up any extra rules needed and how to view the stats. I feel a new project coming on…

---

<div class="post-metadata">

**Author:** ![csweeney05](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/csweeney05/32/1444_2.png) [@csweeney05](https://community.ntppool.org/u/csweeney05)\
**Post date:** [August 6, 2025, 2:18pm UTC](https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011/4 "2025-08-06T14:18:55Z")

</div>

Check out this thread [Monitoring Script](https://community.ntppool.org/t/personnal-project-chrony-network-monitoring-dashboard-lightweight/3860) provides very nice stats.

---

<div class="post-metadata">

**Author:** ![ChrisJ](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/chrisj/32/1822_2.png) [@ChrisJ](https://community.ntppool.org/u/ChrisJ)\
**Post date:** [August 7, 2025, 7:05am UTC](https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011/5 "2025-08-07T07:05:39Z")

</div>

@csweeney05 Thanks. I took a look and actually deployed it on my cloud system. However it (a) doesn’t; break out IPv4 versus IPv6 traffic and (b) it doesn’t allow you to show only NTP traffic (i.e. traffic to/from port 123). Since this system hosts other things besides the crony server it doesn’t really give me what I am looking for unfortunately.

---

<div class="post-metadata">

**Author:** ![microchip8](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/microchip8/32/1388_2.png) [@microchip8](https://community.ntppool.org/u/microchip8)\
**Post date:** [August 7, 2025, 7:13am UTC](https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011/6 "2025-08-07T07:13:06Z")

</div>

Running a time server inside a VM is not really recommended…. just sayin’

---

<div class="post-metadata">

**Author:** ![MagicNTP](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@MagicNTP](https://community.ntppool.org/u/MagicNTP)\
**Post date:** [August 7, 2025, 8:05am UTC](https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011/7 "2025-08-07T08:05:28Z")

</div>

Not true anymore today, at least generally speaking.

---

<div class="post-metadata">

**Author:** ![marco.davids](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/marco.davids/32/767_2.png) [@marco.davids](https://community.ntppool.org/u/marco.davids)\
**Post date:** [August 7, 2025, 8:09am UTC](https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011/8 "2025-08-07T08:09:53Z")

</div>

> [@microchip8](#):
>
> Running a time server inside a VM is not really recommended…. just sayin’

Perhaps @stevesommars has thoughts on this (he looked into this), since quite a few pool servers are virtual these days and appear to perform reasonably well - at least within ‘pool standards’.

---

<div class="post-metadata">

**Author:** ![ChrisJ](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/chrisj/32/1822_2.png) [@ChrisJ](https://community.ntppool.org/u/ChrisJ)\
**Post date:** [August 7, 2025, 8:44am UTC](https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011/9 "2025-08-07T08:44:59Z")

</div>

Really not true these days (and hasn’t been true for several years). Provided things are set up properly and adequately resourced then a VM is fine. This cloud hosted VM has 4 ARM64 cores, 32 GB RAM, 256 GB NVMe storage and 4 Gbit/s internet bandwidth and will give many a ‘real’ machine a good run for its money. If you didn’t know that it was a VM you would find it hard to tell.

---

<div class="post-metadata">

**Author:** ![stevesommars](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/stevesommars/32/2075_2.png) [@stevesommars](https://community.ntppool.org/u/stevesommars)\
**Post date:** [August 7, 2025, 1:55pm UTC](https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011/10 "2025-08-07T13:55:41Z")

</div>

I don’t know what “pool standards” means. If an NTP server returns a Mode 4 response where at least one of the two timestamps is error (taking in account root delay & root distance), then it is a falseticker, at least for some period. By that criteria many NTP servers are occasionally falsetickers. The NTP monitoring system identifies persistent falsetickers and removes them from the pool Transient falsetickers tend to remain in the pool.

I’ve written a few guest articles on Johannes Weber’s [blog](https://weberblog.net/) One covers time inaccuracies on commercial [Microsoft Azure VMs](https://weberblog.net/azure-ptp-accuracy/). I’m writing another VM-related article now.

---

<div class="post-metadata">

**Author:** ![apuls](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/apuls/32/1467_2.png) [@apuls](https://community.ntppool.org/u/apuls)\
**Post date:** [August 7, 2025, 6:28pm UTC](https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011/11 "2025-08-07T18:28:44Z")

</div>

Sidenode: AWS provides a PTP SHM for EC2 which can be access by chrony 🙂

> **[It’s About Time: Microsecond-Accurate Clocks on Amazon EC2 Instances | Amazon...](https://aws.amazon.com/de/blogs/compute/its-about-time-microsecond-accurate-clocks-on-amazon-ec2-instances/)**
>
> This post is written by Josh Levinson, AWS Principal Product Manager and Julien Ridoux, AWS Principal Software Engineer Today, we announced that we improved the Amazon Time Sync Service to microsecond-level clock accuracy on supported Amazon EC2...

---

<div class="post-metadata">

**Author:** ![microchip8](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/microchip8/32/1388_2.png) [@microchip8](https://community.ntppool.org/u/microchip8)\
**Post date:** [August 8, 2025, 11:58am UTC](https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011/12 "2025-08-08T11:58:56Z")

</div>

Doesn’t it create too much jitter/delay as it has to go through two network stacks, one of the VM guest itself and the other of the host server?

---

<div class="post-metadata">

**Author:** ![MagicNTP](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@MagicNTP](https://community.ntppool.org/u/MagicNTP)\
**Post date:** [August 8, 2025, 1:05pm UTC](https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011/13 "2025-08-08T13:05:51Z")

</div>

Two aspects:

- Does it add jitter/latency?
- If jitter/latency _is_ being added, is it sufficiently large, when compared to other factors, such as actual external network transit jitter/latency, that it materially changes the overall performance?

On the first, I don’t think anything noticeable is added with modern systems. Unlike the phrasing “it has to go through two network stacks” might suggest, it is not really two _full_ network stacks. Details obviously depend on, and may be different, depending on the virtualization implementation. But in many cases, the virtual network card in the guest is not fully emulating an actual hardware NIC, but actually aware of its own virtualized nature (just like, e.g., the block storage, or memory management). I.e., packets don’t go up one entire network stack, then down again that same one, to then enter and go up a second network stack. Rather, at least the lower parts of the stack are entirely on the host system, and only the upper parts are actually in the guest. Very roughly like the separation that also exists on a bare metal instance, where the packet enters, and is initially handled within the kernel, before it is passed to the user-space time daemon.

What is more of a challenge is the typical resource sharing nature of virtualization. I.e., does the guest running the time daemon get the resources it needs in a timely fashion. On a well-managed system, that shouldn’t be a problem. On over-committed systems, it may become one.

On the second item, are any jitter/delay incurred relevant in the grand scheme of things? In many cases probably not. E.g., “pool standards” to me means potentially some network distance between a client and the server. In those cases, unless the virtualization is somewhat poor, e.g., high over-commitment, the jitter/delay incurred on the external network would by far outweigh anything that is going on between a virtualized server and its host.

On the other hand, if one needs to synchronize to high accuracy on a local, high-speed unloaded network, it might become more relevant. But then, maybe NTP isn’t even the right protocol anymore, if the requirements are really high. Or at least maybe even a bare-metal but general-purpose server isn’t good enough anymore, and one needs a specialized hardware device with external reference and high-accuracy oscillator.

Now, I don’t have any specific numbers, or statistics, but I think the references mentioned previously will, or will have references to such data. And my description above is based on my take-away from sources such as the above

---

<div class="post-metadata">

**Author:** ![ChrisJ](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/chrisj/32/1822_2.png) [@ChrisJ](https://community.ntppool.org/u/ChrisJ)\
**Post date:** [August 8, 2025, 1:05pm UTC](https://community.ntppool.org/t/is-there-a-chrony-equivalent-for-ntpq-ifstats/4011/14 "2025-08-08T13:05:59Z")

</div>

It very much depends on the cloud infrastructure, hypervisor, resource allocation/sharing etc. My Cloud VM server seems to be behaving just fine as far as I can see. I know that Oracle Cloud paid a lot of attention to those things in the design (I used to work at Oracle). Can’t speak for other clouds but I imagine they did too.
