[ntp:questions] howto read ntpq output directly?

mayer at gis.net mayer at gis.net
Tue Mar 22 17:41:56 UTC 2005


In this case the questioner was asking about getting to the data from C.
For that it's better to create a callable interface rather than write
and reread a file. Otherwise I agree with you.

----- Original Message Follows -----
> Danny,
> The NTP control/monitoring protocol was specifically crafted to be
> easy  prey for a simple perl script. The format of the reply packet is
> freeform ASCII and is exactly what you see if you turn on raw mode in 
> ntpq. The packet format is described in Appendix B of RFC-1305. You 
> would need to send two pcakets, one to retrieve the association IDs,
> the  second to read the selected association.
> Dave

More information about the questions mailing list