# derived metrics for cpu utilization

kernel.cpu.util.user = (100 * rate(kernel.all.cpu.user)) / hinv.ncpu
kernel.cpu.util.user(oneline) = percentage of user time across all CPUs, including guest CPU time

kernel.cpu.util.nice = (100 * rate(kernel.all.cpu.nice)) / hinv.ncpu
kernel.cpu.util.nice(oneline) = percentage of nice user time across all CPUs, including guest nice CPU time

kernel.cpu.util.sys = (100 * rate(kernel.all.cpu.sys)) / hinv.ncpu
kernel.cpu.util.sys(oneline) = percentage of sys time across all CPUs

kernel.cpu.util.idle = (100 * rate(kernel.all.cpu.idle)) / hinv.ncpu
kernel.cpu.util.idle(oneline) = percentage of idle time across all CPUs

kernel.cpu.util.intr = (100 * rate(kernel.all.cpu.intr)) / hinv.ncpu
kernel.cpu.util.intr(oneline) = percentage of interrupt time across all CPUs
kernel.cpu.util.intr(helptext) = '\
Percentage of time spent processing interrupts across all CPUs.
This value includes both soft and hard interrupt processing time.'

kernel.cpu.util.wait = (100 * rate(kernel.all.cpu.wait.total)) / hinv.ncpu
kernel.cpu.util.wait(oneline) = percentage of wait time across all CPUs

kernel.cpu.util.steal = (100 * rate(kernel.all.cpu.steal)) / hinv.ncpu
kernel.cpu.util.steal(oneline) = percentage of virtualization CPU steal time across all CPUs
kernel.cpu.util.steal(helptext) = '\
Percentage of time across all CPUs when a CPU had a runnable process,
but the hypervisor (virtualisation layer) chose to run something else
instead.'
