From: Remi Gacogne Date: Mon, 3 Feb 2020 10:51:54 +0000 (+0100) Subject: auth: Add steal and IO wait metrics X-Git-Tag: auth-4.3.0-beta2~28^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=149a72d861db4969b933f06ebcdd4aa2e8bb8c62;p=thirdparty%2Fpdns.git auth: Add steal and IO wait metrics --- diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index c8c24ede78..ab47d7c27f 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -346,6 +346,12 @@ void declareStats(void) S.declare("sys-msec", "Number of msec spent in system time", getSysUserTimeMsec); S.declare("user-msec", "Number of msec spent in user time", getSysUserTimeMsec); + +#ifdef __linux__ + S.declare("cpu-iowait", "Time spent waiting for I/O to complete by the whole system", getCPUIOWait); + S.declare("cpu-steal", "Stolen time, which is the time spent by the whole system in other operating systems when running in a virtualized environment", getCPUSteal); +#endif + S.declare("meta-cache-size", "Number of entries in the metadata cache", DNSSECKeeper::dbdnssecCacheSizes); S.declare("key-cache-size", "Number of entries in the key cache", DNSSECKeeper::dbdnssecCacheSizes); S.declare("signature-cache-size", "Number of entries in the signature cache", signatureCacheSize); diff --git a/regression-tests.nobackend/counters/command b/regression-tests.nobackend/counters/command index bea9c047c3..9ff54727d7 100755 --- a/regression-tests.nobackend/counters/command +++ b/regression-tests.nobackend/counters/command @@ -27,7 +27,7 @@ $SDIG ::1 $port example.com SOA >&2 >/dev/null $SDIG ::1 $port example.com SOA tcp >&2 >/dev/null $PDNSCONTROL --config-name= --no-config --socket-dir=./ 'show *' | \ - tr ',' '\n'| grep -v -E '(user-msec|sys-msec|uptime|udp-noport-errors|udp-in-errors|real-memory-usage|special-memory-usage|udp-recvbuf-errors|udp-sndbuf-errors|-hit|-miss|fd-usage|latency)' | LC_ALL=C sort + tr ',' '\n'| grep -v -E '(user-msec|sys-msec|cpu-iowait|cpu-steal|uptime|udp-noport-errors|udp-in-errors|real-memory-usage|special-memory-usage|udp-recvbuf-errors|udp-sndbuf-errors|-hit|-miss|fd-usage|latency)' | LC_ALL=C sort kill $(cat pdns*.pid) rm pdns*.pid