Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

describe JVM CPU metrics #3487

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@ groups:
metric_name: process.runtime.jvm.cpu.utilization
brief: "Recent CPU utilization for the process."
note: >
The value range is [0,1].
zeitlinger marked this conversation as resolved.
Show resolved Hide resolved
This utilization is not defined as being for the specific interval since last measurement
(unlike `system.cpu.utilization`).
[Reference](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getProcessCpuLoad()).
zeitlinger marked this conversation as resolved.
Show resolved Hide resolved
instrument: gauge
unit: "1"

Expand All @@ -137,15 +139,22 @@ groups:
metric_name: process.runtime.jvm.system.cpu.utilization
brief: "Recent CPU utilization for the whole system."
note: >
The value range is [0,1].
This utilization is not defined as being for the specific interval since last measurement
(unlike `system.cpu.utilization`).
[Reference](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getCpuLoad()).
instrument: gauge
unit: "1"

- id: metric.process.runtime.jvm.system.cpu.load_1m
type: metric
metric_name: process.runtime.jvm.system.cpu.load_1m
brief: "Average CPU load of the whole system for the last minute."
note: >
The value range is [0,n], where n is the number of CPU cores.
Copy link
Member

@joaopgrassi joaopgrassi May 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, did I get it wrong or the link provided means something else? I couldn't find any mention of CPU cores there. It says

is the sum of the number of runnable entities queued to the available processors and the number of runnable entities running on the available processors averaged over a period of time

Also, the link says when load average is not available, it should return a negative number, which contradicts with the value range added here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the part about negative values, but I still think "CPU cores" is equivalent to the longer explanation in the link. Can you elaborate when/how it could be different?

This utilization is not defined as being for the specific interval since last measurement
(unlike `system.cpu.utilization`).
[Reference](https://docs.oracle.com/en/java/javase/17/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html#getSystemLoadAverage()).
instrument: gauge
unit: "1"

Expand Down