Welcome to the Linux Foundation Forum!

ntpdc

albiurs
albiurs Posts: 38
edited October 15 in LFS207 Class Forum

Hi,
In the lesson "Configuring the ntp Client" (https://trainingportal.linuxfoundation.org/learn/course/linux-system-administration-essentials-lfs207/network-addresses/network-addresses?page=10) the command ntpdc -c peers is suggested to show the time differential between the local system and configured time servers. However, I cannot find the package on Debian. But an apt search and apt info reveals the ntpstat command instead which mentions the ntpdc on the info page:

┌──(alu@nb)-[~]
└─$ apt search ntpdc
Sorting... Done
Full Text Search... Done
ntpstat/stable 0.0.0.1-2+b1 amd64
  show network time protocol (ntp) status


┌──(alu@nb)-[~]
└─$ apt info ntpstat
Package: ntpstat
Version: 0.0.0.1-2+b1
Priority: optional
Section: web
Source: ntpstat (0.0.0.1-2)
Maintainer: Debian OpenStack <team+openstack@tracker.debian.org>
Installed-Size: 29.7 kB
Depends: libc6 (>= 2.15)
Homepage: https://github.com/darkhelmet/ntpstat
Download-Size: 6,436 B
APT-Sources: http://deb.debian.org/debian bookworm/main amd64 Packages
Description: show network time protocol (ntp) status
 This program uses an NTP mode 6 control message, which is the same as that
 used by the ntpq command. The ntpdc command uses NTP mode 7, details of
 which are elusive. For details on the format of NTP control message, see
 http://www.eecis.udel.edu/~mills/database/rfc/rfc1305/rfc1305b.ps.

But even after installing ntpstat, the ntpdc command is not available.

Any suggestions?

Thanks,
Urs

Comments

  • luisviveropena
    luisviveropena Posts: 1,233

    Hi Urs,

    Please use 'ntpq' instead of ntpdc:

    ntpq -c peers

    Regards,
    Luis.

  • albiurs
    albiurs Posts: 38

    Hi Luis,

    Ok thanks. I already played around with ntpq. So can ntpdc be considered as a depricated tool then?

    Regards,
    Urs

  • luisviveropena
    luisviveropena Posts: 1,233

    Hi Urs, it's a pleasure :)

    So can ntpdc be considered as a depricated tool then?

    Yes, that's right. We'll reflect that in the course.

    Regards,
    Luis.

  • albiurs
    albiurs Posts: 38

    Thanks Luis for your feedback.

    Regards,
    Urs

Categories

Upcoming Training