Truncated FQDN/addresses via 'chronyc sources'

For the life of me I can’t find the answer to this, and I could have sworn it was possible, but when using a command like ‘chronyc sources’ if the FQDN or IPv6 address is too long to show in the column, it gets truncated. Wasn’t there a switch that could be used with chronyc that would prevent truncating the name/address and show it in it’s entirety? If there isn’t, is there a log I could grep to get the full FQDN/IPv6 address? I just opened up port 123 to the WAN yesterday, but I am not part of the pool, yet I already see some traffic from unknown clients in the ‘chronyc client’ log. Most likely just port scanners (they only have around 2 connect attempts hours ago), but for those malicious actors I’d like to know so I can block them at the firewall.

My chronyc (v4.6.1) shows the untruncated IPv6 address with “chronyc -n clients”. Doesn’t yours?

I’d use the -n option to not look up the reverse DNS name for the address. You can look up the reverse DNS name separately later on if needed.

I’m confused why you mentioned “sources”. You can see your sources from your /etc/chrony.conf or with “chronyc ntpdata”.

1 Like

Doh. Stupid me, I was using the switch after the command. Apparently, some switches, like -v for verbose, works after the command. No wonder -n never seemed to show a different result when I was using it after the command. Would be nice if the output adjust the size of the columns according to the size of the “screen” like htop and other apps do.

There’s also a wider output option recently added: chronyc: add wide output option (!32) · Merge requests · chrony / chrony · GitLab

Merge details

  • The changes were not merged into master.

:face_with_diagonal_mouth:

… using the Web UI. They were merged manually by the maintainer.

I see.

But I also see that was 2 weeks ago and the last release was from 2025. So until the next official release, this would be something only accessible to those able to compile the code on thier own, and willing use it in essentially a untested Alpha state. :face_with_diagonal_mouth:

This is chrony, mate. It’s not like it hasn’t been the most stable, functional NTP server for years now…

Yes, but it has different meaning. If -v is in front, than it is the command itself (print the version), whatever comes after is a garbage to ignore. If the -v comes after the sources command, then it makes it verbose.

tumbleweed:~ # chronyc sources -v

  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current best, '+' = combined, '-' = not combined,
| /             'x' = may be in error, '~' = too variable, '?' = unusable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^- x.ns.gin.ntt.net              2  10   377   782  +2799us[+2799us] +/-   98ms
^- ns0.fredprod.com              3  10   377    42  +1566us[+1566us] +/-   58ms
^* 37.59.63.125                  2  10   377   979    +50us[  +66us] +/-   14ms
^- dns-v3.ns4v.icu               2  10   377   924  +1853us[+1853us] +/-   53ms
tumbleweed:~ # chronyc -v sources
chronyc (chrony) version 4.8 (+READLINE +SECHASH +IPV6 -DEBUG)
tumbleweed:~ # chronyc -v fsdgs dffg
chronyc (chrony) version 4.8 (+READLINE +SECHASH +IPV6 -DEBUG)
tumbleweed:~ # 

Bad behavior from chronyc. It should complain about the existence of garbage after the subcommand.

tumbleweed:~ # chronyc sources sdfadfadsf cadfasdfd
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^- x.ns.gin.ntt.net              2  10   377   427  +2949us[+2949us] +/-  113ms
^- ns0.fredprod.com              3  10   377   729  +1553us[+1566us] +/-   58ms
^* 37.59.63.125                  2  10   377   632    +55us[  +68us] +/-   14ms
^- dns-v3.ns4v.icu               2  10   377   577   +319us[ +319us] +/-   46ms
tumbleweed:~ #