Win32_PerfRawData_QmsAgentPerf perl sample code
The foundations for Manageability in Windows is Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).
ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself. The Win32_PerfRawData_QmsAgentPerf WMI class can be used in ActiveXperts Network Monitor to monitor your servers.
Sample Code
use Win32::OLE('in'); my $computer = "."; my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") or die "WMI connection failed.\n"; my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_PerfRawData_QmsAgentPerf_LCQMSAgent00QoEMonitoringServerAgent", "WQL"); foreach my $objItem (in $colItems) { print "Caption: $objItem->{Caption}\n"; print "Description: $objItem->{Description}\n"; print "Frequency_Object: $objItem->{Frequency_Object}\n"; print "Frequency_PerfTime: $objItem->{Frequency_PerfTime}\n"; print "Frequency_Sys100NS: $objItem->{Frequency_Sys100NS}\n"; print "Name: $objItem->{Name}\n"; print "QMSAgent000Totalnumberofmetricsreportsreceived: $objItem->{QMSAgent000Totalnumberofmetricsreportsreceived}\n"; print "QMSAgent001Numberofmetricsreportsreceivedpersecond: $objItem->{QMSAgent001Numberofmetricsreportsreceivedpersecond}\n"; print "QMSAgent002Totalnumberofmetricsreportsaccepted: $objItem->{QMSAgent002Totalnumberofmetricsreportsaccepted}\n"; print "QMSAgent003Numberofmetricsreportsacceptedpersecond: $objItem->{QMSAgent003Numberofmetricsreportsacceptedpersecond}\n"; print "QMSAgent004Numberofrejectedmetricsreports: $objItem->{QMSAgent004Numberofrejectedmetricsreports}\n"; print "QMSAgent005Numberofmetricsreportsrejectedpersecond: $objItem->{QMSAgent005Numberofmetricsreportsrejectedpersecond}\n"; print "QMSAgent006Numberofreportsthatfailedvalidationchecks: $objItem->{QMSAgent006Numberofreportsthatfailedvalidationchecks}\n"; print "QMSAgent007Numberofservererrorsoccurringduringreportprocessing: $objItem->{QMSAgent007Numberofservererrorsoccurringduringreportprocessing}\n"; print "QMSAgent008TotalnumberofreportsdroppedbecauseMonitoringServerwasnotenabled: $objItem->{QMSAgent008TotalnumberofreportsdroppedbecauseMonitoringServerwasnotenabled}\n"; print "QMSAgent009TotalnumberofMSMQmessagessent: $objItem->{QMSAgent009TotalnumberofMSMQmessagessent}\n"; print "QMSAgent010Numberofmessagequeuemessagessentpersecond: $objItem->{QMSAgent010Numberofmessagequeuemessagessentpersecond}\n"; print "QMSAgent011Numberofmessagequeuemessagesthatcouldnotbesent: $objItem->{QMSAgent011Numberofmessagequeuemessagesthatcouldnotbesent}\n"; print "QMSAgent012NumberoffailedTLSconnectionattempts: $objItem->{QMSAgent012NumberoffailedTLSconnectionattempts}\n"; print "QMSAgent013Totalnumberofmetricsreportsacceptedbytheexternalreportconsumer: $objItem->{QMSAgent013Totalnumberofmetricsreportsacceptedbytheexternalreportconsumer}\n"; print "QMSAgent014Totalnumberofmetricsreportsrejectedbytheexternalreportconsumer: $objItem->{QMSAgent014Totalnumberofmetricsreportsrejectedbytheexternalreportconsumer}\n"; print "QMSAgent015Totalnumberoffailuresoccurredwhilesendingreportstotheexternalreportconsumer: $objItem->{QMSAgent015Totalnumberoffailuresoccurredwhilesendingreportstotheexternalreportconsumer}\n"; print "QMSAgent016Totalnumberofreportsthatcouldnotbesenttotheexternalreportconsumer: $objItem->{QMSAgent016Totalnumberofreportsthatcouldnotbesenttotheexternalreportconsumer}\n"; print "Timestamp_Object: $objItem->{Timestamp_Object}\n"; print "Timestamp_PerfTime: $objItem->{Timestamp_PerfTime}\n"; print "Timestamp_Sys100NS: $objItem->{Timestamp_Sys100NS}\n"; print "\n"; print "########\n"; print "\n"; }