On Mon, Sep 03, 2018 at 10:48:27PM +0000, Debian Bug Tracking System wrote: > Subject: ntpdc times out when the server monlist has over 600 clients > > Apparently the people at support.ntp.org have it documented: > > http://support.ntp.org/bin/view/Support/MonitoringAndControllingNTP#Who_is_using_my_NTP_server > > | Please note that a maximum of 600 entries is supported with current > | versions of ntpdc. The protocol (or better: the contents of the return > | packets) used by ntpdc is not standardized, therefore it is recommended > | to only use ntpdc with a matching ntpd, i.e. both should have the same > | version number. > | > | To get by this 600 entry limitation, many server operators run client > | statistics scripts [...] > > I went to look at the code, and it looks like ntpdc/ntpdc.c is printing the > contents of the haveseq array, whose size is MAXSEQ+1, which would be 128, > so that doesn't sound like. At the other end, > ntpd/ntp_request.c:mon_getlist_0() is sending over all of the mon_data > structures found in mon_mru_list, and after looking at that, I see the > culprit in ntpd/ntp_monitor.c: > > /* > * Limits on the number of structures allocated. This limit is picked > * with the illicit knowlege that we can only return somewhat less > * than 8K bytes in a mode 7 response packet, and that each structure > * will require about 20 bytes of space in the response. > * > * ... I don't believe the above is true anymore ... jdg > */ > #ifndef MAXMONMEM > #define MAXMONMEM 600 /* we allocate up to 600 structures */ > #endif > [...] > int > ntp_monitor( > [...] > if (mon_free == NULL && mon_total_mem >= MAXMONMEM) { > [...] > > I can't help but think that there are better ways to handle this in > both ntpd and ntpdc. :)
I looked this up after getting the closure message, and it looks like it might have been addressed upstream with: commit 9407fc0ef596404e620317a0acf39d63ed27c550 Author: <davehart@[...]> Date: Sat Feb 27 08:47:04 2010 +0000 [...] Many files: add MRU sizing knobs: mru mindepth 600 maxage 64 maxdepth 1024 maxmem 4096 entries beyond 600 which are older than 64s are reclaimed, with a hard upper limit on the size of maxdepth (indirectly set by maxmem). [...] -- 2. That which causes joy or happiness.