# How to verify CPU Usage and Memory Usage Data from Prometheus data with cluster

**URL:** <https://discuss.prometheus.io/t/how-to-verify-cpu-usage-and-memory-usage-data-from-prometheus-data-with-cluster/3282>\
**Category:** PromQL\
**Created:** [February 8, 2025, 12:16pm UTC](https://discuss.prometheus.io/t/how-to-verify-cpu-usage-and-memory-usage-data-from-prometheus-data-with-cluster/3282 "2025-02-08T12:16:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![akash](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@akash](https://discuss.prometheus.io/u/akash)\
**Post date:** [February 8, 2025, 12:16pm UTC](https://discuss.prometheus.io/t/how-to-verify-cpu-usage-and-memory-usage-data-from-prometheus-data-with-cluster/3282/1 "2025-02-08T12:16:53Z")

</div>

Hi Team,  
I am new to Prometheus  
I have written PromQL to calculate cpu and memory usage when it is more than 80%

CPU Usage Expression  
sum(rate(container\_cpu\_usage\_seconds\_total{container~=“”}[5m])) by (pod) / sum(kube\_pod\_container\_resource\_limits{resource=“cpu”}) by (pod) \* 100 \> 80

Output am getting for few pods as follow  
pod1 0.0775  
pod2 0.599

But when i check from pod bash terminal using top command i see 6.2%~8.2%us

Memory Usage Expression  
sum(container\_memory\_working\_set\_bytes{container!=“”}) by (pod)/sum(container\_spec\_memory\_limit\_bytes{container!=“”}) by (pod) \* 100 \> 80

In grafana i see output 23.4  
but in pod bash terminal when i calculate % of memory usage using top command it is more than 50%.

Please help me here how can i get all the pod name which is consuming more than 80% of memory and more than 80% of CPU

Regards,  
Akash
