Kaseya Community

Get Total processor time with out using Performance counter "

  • hi,

    I need to find out total  processor time , but I DONT WANT TO USE ANY PERFORMANCE COUNTER using WMI script

    is there any possibilities?


    The corresponding performance counter is :    \Processor(_Total)\% Processor Time

    check the pics
    [edited by: sumith at 10:56 PM (GMT -7) on Aug 29, 2013]
  • Hi,

    You can use the following DOS command line within an executeShellCommandToVariable step in an agent procedure and pull the result back in a variable:  

    wmic cpu get loadpercentage|find /v "LoadPercentage"


    Matt Warburton

    Kaseya Professional Services

  • thanks  Matt

  •  "wmic cpu get loadpercentage|find /v "LoadPercentage"

    not return any thing .... why?

    [edited by: sumith at 10:56 PM (GMT -7) on Aug 29, 2013]
  • Use WMI Code Creator. You can download it from the MS site. With that application you can create VB code getting data from WMI classes.

    Created many codes within seconds.

  • Hi,

    If the WMIC command line I posted is not returning anything try running just WMIC by itself without any of the additional command line stuff and see what it returns.  It may provide some insight, and on some systems WMIC the first time you run it needs to initialize things.  While I have not used WMI Code Creator it sounds like Microsofts Scriptomatic tool or maybe is a newer renamed version.  Check to make sure the WMI Service is running and then take a look at some of these useful troubleshooting tools/links: