Hello, Stefan,

I use the Linux kernel to keep overall statistics on the total number of NTP packets and bytes. (I understand that doesn't answer your question.)

I once (in a startup script) ask my kernel to count

        iptables -A INPUT  -p UDP --destination-port 123
        iptables -A OUTPUT -p UDP --source-port 123

and then, via a crontab script, I collect the result of

        iptables -vxnL

Regards, Andreas






Am 11.10.2012 00:41, schrieb Stefan Reisenbauer:
Hello all,

how do you generate these reports where you can see how many clients connect to your NTP Server in a second?

I'm doing this this way:

secs=$(ntpdc -c iostats | grep time | awk ' { print $NF }')
r=$(ntpdc -c iostats | grep -E "received packets|packets sent" | awk '{print $NF }')
in=$(echo "${r}" | head -n 1)
ou=$(echo "${r}" | tail -n 1)
to=$((${in}+${ou}))
echo $(($to/$secs)

But of course, it's a dirty way - any better ideas?


all the best,
stefan



_______________________________________________
pool mailing list
[email protected]
http://lists.ntp.org/listinfo/pool


_______________________________________________
pool mailing list
[email protected]
http://lists.ntp.org/listinfo/pool

Reply via email to