スポンサーリンク

cpu load / utilization / jvm

スポンサーリンク

Definition

cpu load average : The average number of process that is RUNNING and UNINTERRUPTABLE at the specific interval.

cpu usage (utilization) : The ratio or percentage about how much cpu time is used against the total cpu time (real time).

how to check the process of RUNNING and UNITERRUPTABLE

if Linux system, use “top” command

Tasks show the running tasks. Additionally, you can see each process state with “S”. D : UNINTERUPTABLE, R: RUNNING, S:SLEEP

How to get these metrics from Java Application

System Load Average

java.lang.package

OperatingSystemMXBean#getSystemLoadAverage

In Ubuntu, that is same as 1min systemloadaverage

Cpu Utilization

com.sun.management package

OperatingSystemMXBean#getCpuLoad

Cpu Utilization by JVM

com.sun.management package

OperatingSystemMXBean#getProcessCpuLoad

Indicate how much cpu is used for JVM process. 100% means that the cpu is used only JVM process at the period.

so,

getCpuLoad = getProcessCpuLoad (JVM process) + other processes

OpenTelemetry Java agent

The Java agent exports the following metrics by default.

Semantic conventions for JVM metrics
Status: Mixed This document describes semantic conventions for JVM metrics in OpenTelemetry. JVM memory Status: Stable Description: Java Virtual Machine (JVM) m...
タイトルとURLをコピーしました