Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » WMI » perl sample

Win32_PerfFormattedData_DlxPerf 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_PerfFormattedData_DlxPerf 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_PerfFormattedData_DlxPerf_LCDLX00AddressBookandDistributionListExpansion", "WQL");

foreach my $objItem (in $colItems) {
	print "Caption: $objItem->{Caption}\n";
	print "Description: $objItem->{Description}\n";
	print "DLX000Validinputrequests: $objItem->{DLX000Validinputrequests}\n";
	print "DLX001ValidinputrequestsPersec: $objItem->{DLX001ValidinputrequestsPersec}\n";
	print "DLX002Averageprocessingtimeforavalidrequestsinmilliseconds: $objItem->{DLX002Averageprocessingtimeforavalidrequestsinmilliseconds}\n";
	print "DLX004PendingRequeststhatfetchSecurityDescriptors: $objItem->{DLX004PendingRequeststhatfetchSecurityDescriptors}\n";
	print "DLX005AverageSecurityDescriptorfetchtimeinmilliseconds: $objItem->{DLX005AverageSecurityDescriptorfetchtimeinmilliseconds}\n";
	print "DLX007PendingAuthorizationRequests: $objItem->{DLX007PendingAuthorizationRequests}\n";
	print "DLX008Averageauthorizationprocessingtimeinmilliseconds: $objItem->{DLX008Averageauthorizationprocessingtimeinmilliseconds}\n";
	print "DLX010PendingRequeststhatfetchmemberproperties: $objItem->{DLX010PendingRequeststhatfetchmemberproperties}\n";
	print "DLX011Averagememberpropertiesfetchtimeinmilliseconds: $objItem->{DLX011Averagememberpropertiesfetchtimeinmilliseconds}\n";
	print "DLX013Passedauthorizations: $objItem->{DLX013Passedauthorizations}\n";
	print "DLX014PassedauthorizationsPersec: $objItem->{DLX014PassedauthorizationsPersec}\n";
	print "DLX015Invalidinputrequests: $objItem->{DLX015Invalidinputrequests}\n";
	print "DLX016InvalidinputrequestsPersec: $objItem->{DLX016InvalidinputrequestsPersec}\n";
	print "DLX017TimedoutRequeststhatfetchSecurityDescriptors: $objItem->{DLX017TimedoutRequeststhatfetchSecurityDescriptors}\n";
	print "DLX018TimedoutRequeststhatfetchSecurityDescriptorsPersec: $objItem->{DLX018TimedoutRequeststhatfetchSecurityDescriptorsPersec}\n";
	print "DLX019Failedauthorizations: $objItem->{DLX019Failedauthorizations}\n";
	print "DLX020FailedauthorizationsPersec: $objItem->{DLX020FailedauthorizationsPersec}\n";
	print "DLX021TimedoutRequeststhatfetchmemberproperties: $objItem->{DLX021TimedoutRequeststhatfetchmemberproperties}\n";
	print "DLX022TimedoutRequeststhatfetchmemberpropertiesPersec: $objItem->{DLX022TimedoutRequeststhatfetchmemberpropertiesPersec}\n";
	print "DLX023SoapExceptions: $objItem->{DLX023SoapExceptions}\n";
	print "DLX024SoapexceptionsPersec: $objItem->{DLX024SoapexceptionsPersec}\n";
	print "DLX025SucceededAddressBookFileRequests: $objItem->{DLX025SucceededAddressBookFileRequests}\n";
	print "DLX026SucceededAddressBookFileRequestsPerSecond: $objItem->{DLX026SucceededAddressBookFileRequestsPerSecond}\n";
	print "DLX027AverageprocessingtimeforasucceededaddressBookfilerequestinmilliseconds: $objItem->{DLX027AverageprocessingtimeforasucceededaddressBookfilerequestinmilliseconds}\n";
	print "DLX029FailedAddressBookFileRequests: $objItem->{DLX029FailedAddressBookFileRequests}\n";
	print "DLX030FailedAddressBookFileRequestsPerSecond: $objItem->{DLX030FailedAddressBookFileRequestsPerSecond}\n";
	print "DLX031Addressbooksearchrequests: $objItem->{DLX031Addressbooksearchrequests}\n";
	print "DLX032Succeededaddressbooksearchrequests: $objItem->{DLX032Succeededaddressbooksearchrequests}\n";
	print "DLX033Failedaddressbooksearchrequests: $objItem->{DLX033Failedaddressbooksearchrequests}\n";
	print "DLX034AddressbooksearchrequestsPersec: $objItem->{DLX034AddressbooksearchrequestsPersec}\n";
	print "DLX035Averageprocessingtimeforaaddressbooksearchrequestsinmilliseconds: $objItem->{DLX035Averageprocessingtimeforaaddressbooksearchrequestsinmilliseconds}\n";
	print "DLX037AddressbookdatabasequeriesPersec: $objItem->{DLX037AddressbookdatabasequeriesPersec}\n";
	print "DLX038Averageprocessingtimeforaaddressbookdatabasequeryinmilliseconds: $objItem->{DLX038Averageprocessingtimeforaaddressbookdatabasequeryinmilliseconds}\n";
	print "DLX040AddressbookADqueriesPersec: $objItem->{DLX040AddressbookADqueriesPersec}\n";
	print "DLX041AverageprocessingtimeforaaddressbookADqueryinmilliseconds: $objItem->{DLX041AverageprocessingtimeforaaddressbookADqueryinmilliseconds}\n";
	print "DLX043Addressbookprefixstringsearchrequests: $objItem->{DLX043Addressbookprefixstringsearchrequests}\n";
	print "DLX044Addressbookexactstringsearchrequests: $objItem->{DLX044Addressbookexactstringsearchrequests}\n";
	print "DLX045AddressbookprefixDTMFsearchrequests: $objItem->{DLX045AddressbookprefixDTMFsearchrequests}\n";
	print "DLX046AddressbookexactDTMFsearchrequests: $objItem->{DLX046AddressbookexactDTMFsearchrequests}\n";
	print "DLX047Addressbookouscopesearchrequests: $objItem->{DLX047Addressbookouscopesearchrequests}\n";
	print "DLX048Addressbookfullscopesearchrequests: $objItem->{DLX048Addressbookfullscopesearchrequests}\n";
	print "DLX049AddressbookUserSidtoOuPathIdmappingcachesize: $objItem->{DLX049AddressbookUserSidtoOuPathIdmappingcachesize}\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 "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";
}