# Nodes stats API CPU usage value is -1

**URL:** <https://discuss.elastic.co/t/nodes-stats-api-cpu-usage-value-is-1/319782>\
**Category:** Elasticsearch\
**Created:** [November 25, 2022, 3:02am UTC](https://discuss.elastic.co/t/nodes-stats-api-cpu-usage-value-is-1/319782 "2022-11-25T03:02:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ysk8830](https://avatars.discourse-cdn.com/v4/letter/y/8491ac/32.png) [@ysk8830](https://discuss.elastic.co/u/ysk8830)\
**Post date:** [November 25, 2022, 3:02am UTC](https://discuss.elastic.co/t/nodes-stats-api-cpu-usage-value-is-1/319782/1 "2022-11-25T03:02:03Z")

</div>

Hello, I have a question.  
I have installed elasticsearch on azure. OS is Ubuntu.  
And look up the cpu usage.  
I ran '\_cat/nodes?format=json' , and the cpu value is -1.  
can not understand.  
I browsed the documentation ([Get node statistics | Elasticsearch API documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html))

## (integer) Recent CPU usage for the whole system, or -1 if not supported.

In what cases is this not supported?

please answer about my question. thank you.

---

<div class="post-metadata">

**Author:** ![ysk8830](https://avatars.discourse-cdn.com/v4/letter/y/8491ac/32.png) [@ysk8830](https://discuss.elastic.co/u/ysk8830)\
**Post date:** [December 8, 2022, 1:13am UTC](https://discuss.elastic.co/t/nodes-stats-api-cpu-usage-value-is-1/319782/2 "2022-12-08T01:13:40Z")

</div>

I'll document how I solved it.  
It was resolved by changing AdoptOpenJDK to MS OpenJDK and restarting elasticsearch.  
My guess is that it's an issue with using azure and AdoptOpenJDK.

---

<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:** [January 5, 2023, 1:14am UTC](https://discuss.elastic.co/t/nodes-stats-api-cpu-usage-value-is-1/319782/3 "2023-01-05T01:14:13Z")

</div>

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