Re: Requests per second

Miroslav Lichvar <[email protected]> Mon, 11 Aug 2025 12:17:49 +0200
Newsgroups gmane.comp.time.chrony.user
Message-ID <aJnDTcNMb2ie-ZB1@localhost>
On Sun, Aug 10, 2025 at 12:45:01AM +0000, Sviatoslav Feshchenko wrote:
> My server, running chrony 4.3, is part of the NTP Pool Project. Is there a way to determine how many requests per second it is receiving or responding to on average?

By observing the difference in values reported by chronyc serverstats
over the interval you want the average apply to. For example, this
shell script would print averages over one-minute intervals:

while chronyc -c serverstats; do sleep 60; done | \
  awk -F , '{if (l>0) print ($1-l)/60; l=$1}'

> 
> It would seem logical to have this statistic displayed as part of "serverstats" command to chronyc. Is that something that can be implemented easily?

No, not easily. If the reported averages should be accurate, chronyd
would need to save the counters in a queue.

This is better done externally by tools specialized in processing time
series data like rrdtool.

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org 
with "unsubscribe" in the subject.
For help email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org 
with "help" in the subject.
Trouble?  Email [email protected]