gotchaspringMinor
Spring boot prometheus - difference between system_cpu_usage and process_cpu_usage
Viewed 0 times
springbootsystem_cpu_usageprocess_cpu_usagedifferencebetweenprometheusand
Problem
Spring boot reports two statistics when Prometheus in place.
What is the difference between
# HELP system_cpu_usage The "recent cpu usage" for the whole system
# TYPE system_cpu_usage gauge
system_cpu_usage 0.029126213592233007
# HELP process_cpu_usage The "recent cpu usage" for the Java Virtual Machine process
# TYPE process_cpu_usage gauge
process_cpu_usage 0.0What is the difference between
system_cpu_usage and process_cpu_usage ?Solution
As far as I understand,
CPU usage aka CPU time is measured by counting the seconds that a CPU spends processing instructions from an application or from OS.
Both metrics are of type Gauge because their values that can go up or down as their showing a resource usage .
system.cpu.usage is host’s cumulative CPU usage in nanoseconds this includes user, system, idle CPU modes. (the sum of the /proc/stat CPU line)process.cpu.usage is the cpu usage for the JVM process aka CPU time used by the JVM processCPU usage aka CPU time is measured by counting the seconds that a CPU spends processing instructions from an application or from OS.
Both metrics are of type Gauge because their values that can go up or down as their showing a resource usage .
Context
StackExchange DevOps Q#12404, answer score: 1
Revisions (0)
No revisions yet.