cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get host CPU configuration?

Metrologic
Visitor

Hello,

We currently use Dynatrace Managed and I would like to get with API v2 the number of CPU or cores configured for each of our hosts (Virtual or Physical standalone servers running windows or Linux).

I can't find any MetricId in the API V2 list that suit my need.

I could find the right MetricId for host configured memory (builtin:containers.memory.physicalTotalBytes) but not for host number of Virtual CPU(Or Cores) configured : does anyone found the right metricID ?

Thanks for your help.

 

5 REPLIES 5

andre_f
Dynatrace Mentor
Dynatrace Mentor

Thank you very much :  this seems to be what I need and even more 🙂

I'will try and confirm

Yes, would be great if you can let me know if this solution helped. Otherwise I would look again 🙂.

Metrologic
Visitor

Hello Andre,

Yes that's running perfect ! I could get the number of cores and many other usefull informations.

By the way, one extra question ! in the json answer fle, physical memory size is not exactly an Mb or Gb multiple.

Example :

Our server has 32Gb RAM, but in the json file we have find :

"memoryTotal": 33512501248,
"physicalMemory": 33512501248

And so 33512501248 / (1024 * 1024 *1024) = 31,2109 ....

I Stay confused

In my case it is ok, I think. This is what Windows shows:

andre_f_0-1668764069943.png

This is the API result:

"memoryTotal": 34040684544

34040684544 / (1024 * 1024 * 1024) = 31,70....

Featured Posts