Jump to content


Performance counters for system processes

WMI SNMP Windows processes

  • Please log in to reply
1 reply to this topic

#1 boerni



  • Members
  • Pip
  • 2 posts

Posted 27 July 2016 - 02:54 PM

Hi there,


I need to monitor some processes during the load test. I've tried to add a new WMI custom counter and used the method counter.WMIGetValue. When I use this method I will only receive one value. But I need the complete list of all processes. The main problem is the WQL query where I have to specify a column. Is there any way to get the complete record set so that I could use enumeration to get my data?


For example

var objWMIService = GetObject("winmgmts://<computername>/rootCIMV2");
var colItems = objWMIService.EcexQuery("Select * FROM Win32_PerfRawData_PerfProc_Process", "WQL");
var enumItems = new Enumarator(colItems);
for (; !enumItems.atEnd(); enumItems.moveNext()) {
var objItem = enumItem();

Any idea?




#2 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 665 posts

Posted 29 July 2016 - 11:23 AM

You can get a value for specific process using following code:

counter.WMIGetValue("Select * FROM Win32_PerfRawData_PerfProc_Process where Name = 'exampleProcessName'", "exampleParamName", 0)

Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users