]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: Add steal and IO wait metrics
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 3 Feb 2020 10:51:54 +0000 (11:51 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 5 Feb 2020 09:40:42 +0000 (10:40 +0100)
pdns/common_startup.cc
regression-tests.nobackend/counters/command

index c8c24ede7835c2c4b62fefee2d92dc6b873f7acd..ab47d7c27f50b9083a3bb5912aaba603e98c0b9c 100644 (file)
@@ -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);
index bea9c047c37933f9474a0eb9f13cdd25f820792c..9ff54727d7c93d5dd4b2d6d70d09371cb63e49d7 100755 (executable)
@@ -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