# sum(builtin:tech.generic.cpu.usage) versus builtin:host.cpu.usage or builtin:host.cpu.user

**URL:** <https://community.dynatrace.com/t/sum-builtin-tech-generic-cpu-usage-versus-builtin-host-cpu-usage-or-builtin-host-cpu-user/45227>\
**Category:** Open Q&A\
**Tags:** oneagent, processes, cpu\
**Created:** [April 19, 2024, 1:15pm UTC](https://community.dynatrace.com/t/sum-builtin-tech-generic-cpu-usage-versus-builtin-host-cpu-usage-or-builtin-host-cpu-user/45227 "2024-04-19T13:15:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PierreLamonzie](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@PierreLamonzie](https://community.dynatrace.com/u/PierreLamonzie)\
**Post date:** [April 19, 2024, 1:15pm UTC](https://community.dynatrace.com/t/sum-builtin-tech-generic-cpu-usage-versus-builtin-host-cpu-usage-or-builtin-host-cpu-user/45227/1 "2024-04-19T13:15:44Z")

</div>

Hello all,

I wanted to check something very basic - the sum of the CPU usage of my processes is equals to my host CPU usage.

I was not expected to have exactly the same values, maybe some %ages of difference.

But I really have huge differences, quite often 30% to 50%, on both ways.

Figures are better when I compare&nbsp;sum(builtin:tech.generic.cpu.usage) with&nbsp;builtin:host.cpu.user rather than&nbsp;builtin:host.cpu.usage, but results are very far to be “good”

By increasing the resolution, from 1m to 15m for exemple, the differences are less however, even if I still meet differences higher than 20% between metrics in 20% of the cases.

I was wondering where the approach is not correct, and how I can create/use:

\* problems on&nbsp;builtin:tech.generic.cpu.usage thresholds

\* problems on&nbsp;builtin:host.cpu.user thresholds

being sure everything is consistent.

With the data I have, I could generate a problem telling “this process CPU usage is higher than x%” but with a host CPU usage which is lower than x% --\> clearly not good…

(Working on premise)

Thx and regards.

Pierre

---

<div class="post-metadata">

**Author:** ![Eric\_Yu](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/eric_yu/32/20360_2.png) [@Eric\_Yu](https://community.dynatrace.com/u/Eric_Yu)\
**Post date:** [April 22, 2024, 4:58pm UTC](https://community.dynatrace.com/t/sum-builtin-tech-generic-cpu-usage-versus-builtin-host-cpu-usage-or-builtin-host-cpu-user/45227/2 "2024-04-22T16:58:05Z")

</div>

Hi Pierre,

Regarding the description of each metric, you can get an idea by checking the metrics tab:

 ![Eric_Yu_2-1713804815818.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/9/59979bfe846699309977b3573925815301d7a44b.png)

For example, for CPU user vs CPU usage %, here’s the difference:

 ![Eric_Yu_0-1713804686796.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/7/d7b849f62947c838340cc981084fd300eb94e9d8.png)  
&nbsp; &nbsp; &nbsp;  
 ![Eric_Yu_1-1713804724370.png](https://global.discourse-cdn.com/dynatrace/original/2X/8/898370966133bed2d5cb71b2bf670c014154973e.png)

The one you’re looking for should be&nbsp;builtin:host.cpu.usage. And for the comparison between that and the&nbsp;builtin:tech.generic.cpu.usage per process, they should be around the same when aggregated. From my tests:

 ![Eric_Yu_3-1713804973970.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/1/51b28fd61fc15990943ba7a9cd46821020bb80c1.png)

Can you provide the metric selectors of yours? It may be helpful to see what’s going on there.

Regards,

---

<div class="post-metadata">

**Author:** ![PierreLamonzie](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@PierreLamonzie](https://community.dynatrace.com/u/PierreLamonzie)\
**Post date:** [April 22, 2024, 9:23pm UTC](https://community.dynatrace.com/t/sum-builtin-tech-generic-cpu-usage-versus-builtin-host-cpu-usage-or-builtin-host-cpu-user/45227/3 "2024-04-22T21:23:55Z")

</div>

Hello Eric,

thank you so much for your answer.

I was using the same selector than you, but discrepancies look to be higher than yours:

 ![Capture d'écran 2024-04-22 231312.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/b/6b63501cf4552b30389cf3a9e959ec4349043fa1.png)

The absolute difference between the two values is low, but the relative difference can be very high.

This uncertainty is maybe intrinsic to the way those data are captured, because anyway usage values are quite low, it’s hard to get a perfect accuracy from the linux OS itself.

Thank you again for your feedback, let’s consider this topic as closed.

Best regards.

Pierre
