vCenter

 View Only
  • 1.  Issue with getProcCpu on windows.

    Posted Apr 10, 2009 11:02 PM
    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


  • 2.  RE: Issue with getProcCpu on windows.

    Broadcom Employee
    Posted Apr 18, 2009 03:37 PM
    Hi Bhavin,

    Do you see the correct cpu% using the following command:
    java -jar sigar.jar Top

    ?


  • 3.  RE: Issue with getProcCpu on windows.

    Posted May 04, 2009 10:41 PM
    Hi Doug,

    I dont see the correct CPU percentage when I run java -jar sigar.jar Top <pid>. The pid is for a process that I see which consumes about 1-2% in the windows task manager. Sigar shows this as 6-10%.

    Thanks
    Bhavin