If enabled, collect Linux Delay Accounding information for matching processes.
Delay Accounting provides the time processes wait for the CPU to become
available, for I/O operations to finish, for pages to be swapped in and for
-freed pages to be reclaimed. The metrics are reported as a percentage, e.g.
-C<percent-delay-cpu>. Disabled by default.
+freed pages to be reclaimed. The metrics are reported as "seconds per second"
+using the C<delay_rate> type, e.g. C<delay_rate-delay-cpu>.
+Disabled by default.
This option is only available on Linux, requires the C<libmnl> library and
requires the C<CAP_NET_ADMIN> capability at runtime.
plugin_dispatch_values(&vl);
}
- /* The ps->delay_* metrics are in nanoseconds per second. This factor converts
- * them to a percentage. */
- gauge_t const delay_factor = 100.0 / 1000000000.0;
+ /* The ps->delay_* metrics are in nanoseconds per second. Convert to seconds
+ * per second. */
+ gauge_t const delay_factor = 1000000000.0;
struct {
char *type_instance;
if (isnan(delay_metrics[i].rate_ns)) {
continue;
}
- sstrncpy(vl.type, "percent", sizeof(vl.type));
+ sstrncpy(vl.type, "delay_rate", sizeof(vl.type));
sstrncpy(vl.type_instance, delay_metrics[i].type_instance,
sizeof(vl.type_instance));
vl.values[0].gauge = delay_metrics[i].rate_ns * delay_factor;
current_connections value:GAUGE:0:U
current_sessions value:GAUGE:0:U
delay value:GAUGE:-1000000:1000000
+delay_rate value:GAUGE:0:U
derive value:DERIVE:0:U
df used:GAUGE:0:1125899906842623, free:GAUGE:0:1125899906842623
df_complex value:GAUGE:0:U