How to get host CPU configuration?

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.

Hi @Metrologic

have you tried this: V2 API - Get Platform and Get Number of CPUs

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

I’will try and confirm

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

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…