VMware Cloud Community
vashibhavin
Contributor
Contributor

Issues with getProcCpu on windows

Hi,

I am developing an performance automation framework which monitors usage of various services. I am using the getProcCpu call to get back CPU stats. Even on full load of the services, I always get the CPU Percent as 1.

CPU: {User=68812, LastTime=1239403742902, Percent=1.0, StartTime=1239401956562, Total=71280, Sys=2468}

To verify, I opened the windows task manager. As expected it showed a 35%. Is this an existing bug or am I using it wrong? I have a 32-bit windows with intel xeon processor.
I remember I was hitting an issue on windows with negative CPU percentage. I beleive it has been fixed in the latest release since I am not seeing that anymore. Kindly help me out here. Since if this does not work, I need to find another way of getting resource stats. I really dont want to use scripts to get that 😞

Thanks
Bhavin
0 Kudos
0 Replies