locked
Windows 7 64 bit multi-core, How to use WMI to get the CPU utilization of each core for a single process? RRS feed

  • Question

  • Dear All,

    I'm using Windows 7 64 bit on a laptop, the CPU is i7, 4 cores. When I run the R software, some functions will take a lot of CPU utilization, so I want to record the progress. Could somebody teach me how to use the WMI to get the CPU utilization of each core for a single process? I know how to get the Memory utilization just like :

    [code]

    Set objWMI = GetObject("winmgmts:\\.\root\cimv2")
    Set colObjects = objWMI.ExecQuery("Select * From Win32_Process Where Name = 'Rscript.exe'")

    For Each Item in colObjects
        WScript.Echo Item.Name & " - " & Item.WorkingSetSize
    Next

    [/code]

    But about the CPU utilization, I know nothing. Thank you all.

    Best Regards,

    Sniperhgy

    Monday, April 27, 2015 6:09 AM

Answers

All replies