[ntp:questions] NTP server - Number of received petitions.

Brian Inglis Brian.Inglis at SystematicSw.ab.ca
Tue Mar 21 19:22:29 UTC 2017

On 2017-03-21 08:05, Harlan Stenn wrote:
> Miroslav Lichvar writes:
>> On Tue, Mar 21, 2017 at 12:01:21PM +0000, Ra=FAl wrote:
>>> But I don't need anything special, I'm just looking how to know
>>> the load of my NTP server, how many request I'm receiving from
>>> clients. I thought that doing that would be easy.
>> If you just need current rate of requests and don't care about 
>> individual clients, you could periodically call ntpdc -c iostats
>> and calculate the rate from the total number of received packets
>> using awk for instance:
>> while true; do ntpdc -c iostats; sleep 1; done | \
>> 	awk '/received packets/{ print $3 - last; last=3D$3}' =
> 4.2.6 should have a similar command via ntpdc.
> And in 4.2.8 (at least) , iostats is available in ntpq.

http://doc.ntp.org/4.2.6p5/ntpdc.html documents monlist but not 
its output. It's been disabled in newer releases and deconfigured 
in older releases since the DDoS attacks using it against 
misconfigured public servers. So I can't easily try it and it may 
not work for you if that was one of the patches applied to CentOS.

Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

More information about the questions mailing list