On 11/10/12 11:42, Stefan Reisenbauer wrote:
Hi Andreas,

thanks for the information.
I created a script which collects the data from kernel, and put it into a RRD:

http://time.reisenb.at/ntp.png

5.9 Pkt/s seconds seems very less?

all the best,

Stefan

2012/10/11 Andreas Krüger <[email protected] <mailto:[email protected]>>

    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]  <mailto:[email protected]>
    http://lists.ntp.org/listinfo/pool


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




--
mit besten Grüßen,

Stefan Reisenbauer



_______________________________________________
pool mailing list
[email protected]
http://lists.ntp.org/listinfo/pool
The number of queries you receive will depend on your bandwidth setting, it is set up such that it is in proportion to the bw setting, which zones your server is in will affect it also depending on the number of clients looking for servers in that zone and how many servers there are.
_______________________________________________
pool mailing list
[email protected]
http://lists.ntp.org/listinfo/pool

Reply via email to