Collecting and Monitoring information from WMI as performance data


<!--[if lt IE 9]>

<![endif]-->

Comments (16)

  1. Kevin Holman says:

    You dont need to use WMI for that.  

    A simple perf monitor… Process, % Processor Time, dllhost*

  2. Kevin Holman says:

    Process Private Bytes ProcessName=Instance

  3. Anonymous says:

    I have a need to replicate the "Total CPU Utilization Percentage" scom monitor because the team would like an email at 3 consecutive samples and a page at 10 consecutive samples.  I should have looked more closely, it looks like this can be done with "windows performance counters" but it would be "nice" to learn how to do this in WMI.

    I believe this is the query: SELECT PercentProcessorTime FROM Win32_PerfFormattedData_PerfOS_Processor WHERE   Name="_Total"

    That will return processor %.  It would be nice if someone knows how to add processor queue length as well.

    I've tried a few things but have been unsucessful in that the value returned always seems to be 0.

    Since I select the "_total", should the "Monitor Target" be windows_server or "Windows Server 2003 processor"?  I believe this should be windows_server and select "NULL" for the instance.

    For the Performance Mapper, I've tried:

    Object: WMI Processor Pct Total

    Counter: PercentProcessorTime

    Instance: NULL

    Value:  $Data/Property[@Name='PercentProcessorTime']$

    Object: Processor

    Counter: PercentProcessorTime

    Instance: NULL

    Value:  $Data/Property[@Name='PercentProcessorTime']$

    Object: WMI Processor Pct Total

    Counter: PercentProcessorTime

    Instance: NULL

    Value:  $Data/Property[@Name='PercentProcessorTime']$

    Object: WMI Processor Pct Total

    Counter: PercentProcessorTime

    Instance: NULL

    Value:  $ $Data/Context/Property[@Name='PercentProcessorTime']$%

    They all seem to return 0 for     $Data/Context/Value$  and   $Data/Context/SampleValue$

    The performance collection rule is working fine.  So, I presume my problem is with what I'm using in the Performance Mapper.

    Thanks,

    Paul

  4. Kevin Holman says:

    So first I have to ask – if you are monitoring memory use from a specific process – why wouldnt you use the built in performance counter for that?

  5. Anonymous says:

    So i’m guessing you cant’ edit this after saving?  I haven’t found a way

  6. Kevin,

    You should check out  WMI Explorer – http://www.ks-soft.net/hostmon.eng/wmi/index.htm – great tool to browse WMI and get your query right

  7. Eric says:

    How would one go about monitoring multiple instances returned from a WMI Query?  For instance I am trying to monitor memory usage for a specific process which there are multiple instances running at the time.  I followed the example but am only getting the first instance of the process returned, is there a way to get all of the instances of the query?

  8. Eric says:

    Well I guess my ignorance got the best of me I did not realize there was one for individual processes… Anyhow I did figure out the whole instance thing and have it working, however if it is easier to do it the other way for future reference what is the counter???

    BTW Excellent article I can see where this will be very useful in future applications!!!

  9. Eric says:

    Sweet Thanks ProcessWorking SetProcessName seems to do the trick as well!

  10. Daniel says:

    Thanks for the information.

    Could you please note that the values in the performance mapper is case sensitive. I received the following error because I my parameters did not use the correct case.

    "Module was unable to convert parameter to a double value Original".

  11. Andrew says:

    I need to monitor %processor time for all the instances of dllhost, i.e. dllhost, dllhost#1, dllhost#2, etc. How would you do that here? Thanks!

  12. Andrew says:

    That works beautifully and is what I wanted all along. I have asked this question (i.e. can you use wildcards in the instance name) in a number of places, and you’re the first one who answered. I figured no reply meant ‘no, you can’t’. Thanks!

  13. marshall3k says:

    Hello,

    i need to monitor all %processor time for all services on a server. How can i do that? Thanks.

  14. Anonymous says:

    SCOM has many different ways to monitor for a file size. Here are some simple examples using script and

  15. Anonymous says:

    Collecting and Monitoring information from WMI as performance data – Kevin Holman’s System Center Blog – Site Home – TechNet Blogs

  16. Anonymous says:

    Collecting and Monitoring information from WMI as performance data – Kevin Holman’s System Center Blog – Site Home – TechNet Blogs

Skip to main content