From: bert hubert Date: Mon, 18 Sep 2017 09:21:52 +0000 (+0200) Subject: add dynamic cache size metrics & documentation X-Git-Tag: rec-4.1.0-rc1~19^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5699%2Fhead;p=thirdparty%2Fpdns.git add dynamic cache size metrics & documentation --- diff --git a/pdns/rec_channel_rec.cc b/pdns/rec_channel_rec.cc index 51436a0c86..0e6b34854e 100644 --- a/pdns/rec_channel_rec.cc +++ b/pdns/rec_channel_rec.cc @@ -843,7 +843,9 @@ void registerAllStats() addGetStat("cache-hits", doGetCacheHits); addGetStat("cache-misses", doGetCacheMisses); - addGetStat("cache-entries", doGetCacheSize); + addGetStat("cache-entries", doGetCacheSize); + addGetStat("max-cache-entries", []() { return g_maxCacheEntries.load(); }); + addGetStat("max-packetcache-entries", []() { return g_maxPacketCacheEntries.load();}); addGetStat("cache-bytes", doGetCacheBytes); addGetStat("packetcache-hits", doGetPacketCacheHits); diff --git a/pdns/recursordist/docs/metrics.rst b/pdns/recursordist/docs/metrics.rst index 0d7e930432..760b06e737 100644 --- a/pdns/recursordist/docs/metrics.rst +++ b/pdns/recursordist/docs/metrics.rst @@ -246,7 +246,15 @@ counts all end-user initiated queries with the RD bit set, received over IPv6 malloc-bytes ^^^^^^^^^^^^ -returns the number of bytes allocated by the process (broken, always returns 0) +returns the number of bytes allocated by the process (broken, always returns 0) + +max-cache-entries +^^^^^^^^^^^^^^^^^ +currently configured maximum number of cache entries + +max-packetcache-entries +^^^^^^^^^^^^^^^^^ +currently configured maximum number of packet cache entries max-mthread-stack ^^^^^^^^^^^^^^^^^