[ntp:questions] howto read ntpq output directly?

avishai.hendel at gmail.com avishai.hendel at gmail.com
Mon Mar 21 09:33:12 UTC 2005

hello there.

i have a network of machines that are synchronized by ntpd.
i would like to read the output of nptq -c peer directly from
my c source code (specifically, i would like to read the tallycode
to know if the machines are synced). one ugly way is to
system("ntpq -c peer > somefile"), and do some parsing on the output
file (looking for * and such). does any of you masters of global
time know of a cleaner way to do that?
greatly appreciate your oncoming help,

More information about the questions mailing list