# Apm, openshift cpu usage

**URL:** <https://discuss.elastic.co/t/apm-openshift-cpu-usage/285653>\
**Category:** APM\
**Tags:** java\
**Created:** [October 1, 2021, 7:11am UTC](https://discuss.elastic.co/t/apm-openshift-cpu-usage/285653 "2021-10-01T07:11:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![johanostberg](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@johanostberg](https://discuss.elastic.co/u/johanostberg)\
**Post date:** [October 1, 2021, 7:11am UTC](https://discuss.elastic.co/t/apm-openshift-cpu-usage/285653/1 "2021-10-01T07:11:35Z")

</div>

Hi i have a question about memory and cpu metrics from openshift pods.  
From the APM java agent we are getting values in %.  
Is the % calculated from request and request limits???

How can we change from % to get the actual values would like to se pod cpu usage in millicores and pod memory in MiB

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/8/684df114b6986df6acf6548d75f260d035a3c89d.png)

---

<div class="post-metadata">

**Author:** ![Sylvain\_Juge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_juge/32/55521_2.png) [@Sylvain\_Juge](https://discuss.elastic.co/u/Sylvain_Juge)\
**Post date:** [October 1, 2021, 12:25pm UTC](https://discuss.elastic.co/t/apm-openshift-cpu-usage/285653/2 "2021-10-01T12:25:00Z")

</div>

Hi @johanostberg ,

Those metrics are reported by the JVM itself when the APM agent is installed, which is not aware of the surrounding infrastructure, thus there is no way to convert them to any other unit in the graphs themselves.

However, you can do that monitoring system metrics directly, for example by using an appropriate metricbeat module.

---

<div class="post-metadata">

**Author:** ![johanostberg](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@johanostberg](https://discuss.elastic.co/u/johanostberg)\
**Post date:** [October 4, 2021, 8:21am UTC](https://discuss.elastic.co/t/apm-openshift-cpu-usage/285653/3 "2021-10-04T08:21:49Z")

</div>

Ok so can you explain for me how the JVM calculates % usage?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 25, 2021, 4:21am UTC](https://discuss.elastic.co/t/apm-openshift-cpu-usage/285653/4 "2021-10-25T04:21:59Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
