From c46df0cada6b7eec11805aec1a1c30ef001b0453 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 10 Feb 2020 11:53:24 +0100 Subject: [PATCH] Document that IO wait and steal metrics are in units of USER_HZ. --- pdns/common_startup.cc | 4 ++-- pdns/dnsdist-web.cc | 4 ++-- pdns/dnsdistdist/docs/statistics.rst | 4 ++-- pdns/recursordist/docs/metrics.rst | 4 ++-- pdns/recursordist/rec_metrics.hh | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index ab47d7c27f..8da7f9c10c 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -348,8 +348,8 @@ void declareStats(void) 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); + S.declare("cpu-iowait", "Time spent waiting for I/O to complete by the whole system, in units of USER_HZ", 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, in units of USER_HZ", getCPUSteal); #endif S.declare("meta-cache-size", "Number of entries in the metadata cache", DNSSECKeeper::dbdnssecCacheSizes); diff --git a/pdns/dnsdist-web.cc b/pdns/dnsdist-web.cc index c246a40f4b..63dd730ad2 100644 --- a/pdns/dnsdist-web.cc +++ b/pdns/dnsdist-web.cc @@ -80,9 +80,9 @@ const std::map MetricDefinitionStorage::metrics{ { "empty-queries", MetricDefinition(PrometheusMetricType::counter, "Number of empty queries received from clients")}, { "cache-hits", MetricDefinition(PrometheusMetricType::counter, "Number of times an answer was retrieved from cache")}, { "cache-misses", MetricDefinition(PrometheusMetricType::counter, "Number of times an answer not found in the cache")}, - { "cpu-iowait", MetricDefinition(PrometheusMetricType::counter, "Time waiting for I/O to complete by the whole system")}, + { "cpu-iowait", MetricDefinition(PrometheusMetricType::counter, "Time waiting for I/O to complete by the whole system, in units of USER_HZ")}, { "cpu-user-msec", MetricDefinition(PrometheusMetricType::counter, "Milliseconds spent by dnsdist in the user state")}, - { "cpu-steal", MetricDefinition(PrometheusMetricType::counter, "Stolen time, which is the time spent by the whole system in other operating systems when running in a virtualized environment")}, + { "cpu-steal", MetricDefinition(PrometheusMetricType::counter, "Stolen time, which is the time spent by the whole system in other operating systems when running in a virtualized environment, in units of USER_HZ")}, { "cpu-sys-msec", MetricDefinition(PrometheusMetricType::counter, "Milliseconds spent by dnsdist in the system state")}, { "fd-usage", MetricDefinition(PrometheusMetricType::gauge, "Number of currently used file descriptors")}, { "dyn-blocked", MetricDefinition(PrometheusMetricType::counter, "Number of queries dropped because of a dynamic block")}, diff --git a/pdns/dnsdistdist/docs/statistics.rst b/pdns/dnsdistdist/docs/statistics.rst index 5f298826ff..c6456ee5c8 100644 --- a/pdns/dnsdistdist/docs/statistics.rst +++ b/pdns/dnsdistdist/docs/statistics.rst @@ -38,13 +38,13 @@ cpu-iowait ---------- .. versionadded:: 1.5.0 -Time spent waiting for I/O to complete by the whole system. +Time spent waiting for I/O to complete by the whole system, in units of USER_HZ. cpu-steal --------- .. versionadded:: 1.5.0 -Stolen time, which is the time spent by the whole system in other operating systems when running in a virtualized environment. +Stolen time, which is the time spent by the whole system in other operating systems when running in a virtualized environment, in units of USER_HZ. cpu-sys-msec ------------ diff --git a/pdns/recursordist/docs/metrics.rst b/pdns/recursordist/docs/metrics.rst index 52e7f9cc8f..e6aedde774 100644 --- a/pdns/recursordist/docs/metrics.rst +++ b/pdns/recursordist/docs/metrics.rst @@ -193,13 +193,13 @@ cpu-iowait ^^^^^^^^^^ .. versionadded:: 4.4 -Time spent waiting for I/O to complete by the whole system. +Time spent waiting for I/O to complete by the whole system, in units of USER_HZ. cpu-steal ^^^^^^^^^ .. versionadded:: 4.4 -Stolen time, which is the time spent by the whole system in other operating systems when running in a virtualized environment. +Stolen time, which is the time spent by the whole system in other operating systems when running in a virtualized environment, in units of USER_HZ. dlg-only-drops ^^^^^^^^^^^^^^ diff --git a/pdns/recursordist/rec_metrics.hh b/pdns/recursordist/rec_metrics.hh index 3c6d7d7839..413b758c0f 100644 --- a/pdns/recursordist/rec_metrics.hh +++ b/pdns/recursordist/rec_metrics.hh @@ -444,10 +444,10 @@ private: {"cpu-iowait", MetricDefinition(PrometheusMetricType::counter, - "Time spent waiting for I/O to complete by the whole system")}, + "Time spent waiting for I/O to complete by the whole system, in units of USER_HZ")}, {"cpu-steal", MetricDefinition(PrometheusMetricType::counter, - "Stolen time, which is the time spent by the whole system in other operating systems when running in a virtualized environment")}, + "Stolen time, which is the time spent by the whole system in other operating systems when running in a virtualized environment, in units of USER_HZ")}, }; }; -- 2.47.2