VMware Cloud Community
sxnxr
Commander
Commander
Jump to solution

SM to get CPU cores

I am trying to create a SM to divide the total amount of cores in a host with the number of cpu packages in the host to give me the cores per socket.

I can get sum(${this, metric=hardware|cpuInfo|num_CpuCores})/2 to work but not all my hosts have 2 sockets. Is there a way to use the packages attribute to divide the metric?

Reply
0 Kudos
1 Solution

Accepted Solutions
MichaelRyom
Hot Shot
Hot Shot
Jump to solution

Have you checked if it is enabled in policy ?

pastedImage_0.png

It not in my vRops 6.3 - I guess that should solve your problem.

Blogging at https://MichaelRyom.dk

View solution in original post

Reply
0 Kudos
4 Replies
ASavener2
Enthusiast
Enthusiast
Jump to solution

First effort:  Sum((${this, metric=hardware|cpuInfo|num_CpuCores})/(${this, metric=hardware|cpuInfo|numCpuPackages, depth=1}))

Reply
0 Kudos
sxnxr
Commander
Commander
Jump to solution

Thanks for the reply but is still gives me no data. the first part works ok and returns the total amount of cores when i visualize the SM but when i use the second part on its own or using your full SM i get no data.

I am guessing this is because there is no metric for a package but there is for an attribute

Super Metric.png

I have tried to use the attribute but it wont work either

Reply
0 Kudos
MichaelRyom
Hot Shot
Hot Shot
Jump to solution

Have you checked if it is enabled in policy ?

pastedImage_0.png

It not in my vRops 6.3 - I guess that should solve your problem.

Blogging at https://MichaelRyom.dk
Reply
0 Kudos
sxnxr
Commander
Commander
Jump to solution

You are the man. i was looking at packages and not sockets in the policy. The packages was enabled but the sockets one was not.

once enabled the following SM worked a treat

sum(${this, metric=cpu|corecount_provisioned, depth=1})/sum(${this, metric=cpu|numpackages, depth=1})

Got to love the metric is called packages and the description of the metric and in the policy is sockets

Thanks again

Reply
0 Kudos