VMware {code} Community
alagammal
Contributor
Contributor

Is Counter id same for all vm?

We need to get performance counter(cpu,disk,memory usage) for all vm . So we are collecting performance counter at once to collect metric id for performance counter as like below

            PropertySpec propertySpec = new PropertySpec();
            propertySpec.setAll(Boolean.FALSE);
            propertySpec.getPathSet().add("perfCounter");
            propertySpec.setType("PerformanceManager");
            List<PropertySpec> propertySpecs = new ArrayList<PropertySpec>();
            propertySpecs.add(propertySpec);

Is it correct? Because we are getting wrong cpu.usage.average value like 340 . But needs to be below 100 rt?

Note, we are having 2vCPU for a vm which gets 340 as cpu usage.

Thanks,

Alex

0 Kudos
1 Reply
stumpr
Virtuoso
Virtuoso

Probably, but not guaranteed.  You should do the proper lookup process for the counter id with the counter name properties for each session.  They may remain consistent for a vCenter, but I would be thorough to avoid any issues.

The values should be divided by 100 I believe...so 300 is actually 3.00%.

Reuben Stump | http://www.virtuin.com | @ReubenStump
0 Kudos