Contact Info

Crumbtrail

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

Win32_PerfRawData_DlxPerf python 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_DlxPerf WMI class can be used in ActiveXperts Network Monitor to monitor your servers.


Sample Code

from win32com.client import GetObject
objWMI = GetObject('winmgmts:').InstancesOf('Win32_PerfRawData_DlxPerf_LCDLX00AddressBookandDistributionListExpansion')

for obj in objWMI:
	if obj.Caption != None:
		print("Caption:" + str(obj.Caption))
	if obj.Description != None:
		print("Description:" + str(obj.Description))
	if obj.DLX000Validinputrequests != None:
		print("DLX000Validinputrequests:" + str(obj.DLX000Validinputrequests))
	if obj.DLX001ValidinputrequestsPersec != None:
		print("DLX001ValidinputrequestsPersec:" + str(obj.DLX001ValidinputrequestsPersec))
	if obj.DLX002Averageprocessingtimeforavalidrequestsinmilliseconds != None:
		print("DLX002Averageprocessingtimeforavalidrequestsinmilliseconds:" + str(obj.DLX002Averageprocessingtimeforavalidrequestsinmilliseconds))
	if obj.DLX002Averageprocessingtimeforavalidrequestsinmilliseconds_Base != None:
		print("DLX002Averageprocessingtimeforavalidrequestsinmilliseconds_Base:" + str(obj.DLX002Averageprocessingtimeforavalidrequestsinmilliseconds_Base))
	if obj.DLX004PendingRequeststhatfetchSecurityDescriptors != None:
		print("DLX004PendingRequeststhatfetchSecurityDescriptors:" + str(obj.DLX004PendingRequeststhatfetchSecurityDescriptors))
	if obj.DLX005AverageSecurityDescriptorfetchtimeinmilliseconds != None:
		print("DLX005AverageSecurityDescriptorfetchtimeinmilliseconds:" + str(obj.DLX005AverageSecurityDescriptorfetchtimeinmilliseconds))
	if obj.DLX005AverageSecurityDescriptorfetchtimeinmilliseconds_Base != None:
		print("DLX005AverageSecurityDescriptorfetchtimeinmilliseconds_Base:" + str(obj.DLX005AverageSecurityDescriptorfetchtimeinmilliseconds_Base))
	if obj.DLX007PendingAuthorizationRequests != None:
		print("DLX007PendingAuthorizationRequests:" + str(obj.DLX007PendingAuthorizationRequests))
	if obj.DLX008Averageauthorizationprocessingtimeinmilliseconds != None:
		print("DLX008Averageauthorizationprocessingtimeinmilliseconds:" + str(obj.DLX008Averageauthorizationprocessingtimeinmilliseconds))
	if obj.DLX008Averageauthorizationprocessingtimeinmilliseconds_Base != None:
		print("DLX008Averageauthorizationprocessingtimeinmilliseconds_Base:" + str(obj.DLX008Averageauthorizationprocessingtimeinmilliseconds_Base))
	if obj.DLX010PendingRequeststhatfetchmemberproperties != None:
		print("DLX010PendingRequeststhatfetchmemberproperties:" + str(obj.DLX010PendingRequeststhatfetchmemberproperties))
	if obj.DLX011Averagememberpropertiesfetchtimeinmilliseconds != None:
		print("DLX011Averagememberpropertiesfetchtimeinmilliseconds:" + str(obj.DLX011Averagememberpropertiesfetchtimeinmilliseconds))
	if obj.DLX011Averagememberpropertiesfetchtimeinmilliseconds_Base != None:
		print("DLX011Averagememberpropertiesfetchtimeinmilliseconds_Base:" + str(obj.DLX011Averagememberpropertiesfetchtimeinmilliseconds_Base))
	if obj.DLX013Passedauthorizations != None:
		print("DLX013Passedauthorizations:" + str(obj.DLX013Passedauthorizations))
	if obj.DLX014PassedauthorizationsPersec != None:
		print("DLX014PassedauthorizationsPersec:" + str(obj.DLX014PassedauthorizationsPersec))
	if obj.DLX015Invalidinputrequests != None:
		print("DLX015Invalidinputrequests:" + str(obj.DLX015Invalidinputrequests))
	if obj.DLX016InvalidinputrequestsPersec != None:
		print("DLX016InvalidinputrequestsPersec:" + str(obj.DLX016InvalidinputrequestsPersec))
	if obj.DLX017TimedoutRequeststhatfetchSecurityDescriptors != None:
		print("DLX017TimedoutRequeststhatfetchSecurityDescriptors:" + str(obj.DLX017TimedoutRequeststhatfetchSecurityDescriptors))
	if obj.DLX018TimedoutRequeststhatfetchSecurityDescriptorsPersec != None:
		print("DLX018TimedoutRequeststhatfetchSecurityDescriptorsPersec:" + str(obj.DLX018TimedoutRequeststhatfetchSecurityDescriptorsPersec))
	if obj.DLX019Failedauthorizations != None:
		print("DLX019Failedauthorizations:" + str(obj.DLX019Failedauthorizations))
	if obj.DLX020FailedauthorizationsPersec != None:
		print("DLX020FailedauthorizationsPersec:" + str(obj.DLX020FailedauthorizationsPersec))
	if obj.DLX021TimedoutRequeststhatfetchmemberproperties != None:
		print("DLX021TimedoutRequeststhatfetchmemberproperties:" + str(obj.DLX021TimedoutRequeststhatfetchmemberproperties))
	if obj.DLX022TimedoutRequeststhatfetchmemberpropertiesPersec != None:
		print("DLX022TimedoutRequeststhatfetchmemberpropertiesPersec:" + str(obj.DLX022TimedoutRequeststhatfetchmemberpropertiesPersec))
	if obj.DLX023SoapExceptions != None:
		print("DLX023SoapExceptions:" + str(obj.DLX023SoapExceptions))
	if obj.DLX024SoapexceptionsPersec != None:
		print("DLX024SoapexceptionsPersec:" + str(obj.DLX024SoapexceptionsPersec))
	if obj.DLX025SucceededAddressBookFileRequests != None:
		print("DLX025SucceededAddressBookFileRequests:" + str(obj.DLX025SucceededAddressBookFileRequests))
	if obj.DLX026SucceededAddressBookFileRequestsPerSecond != None:
		print("DLX026SucceededAddressBookFileRequestsPerSecond:" + str(obj.DLX026SucceededAddressBookFileRequestsPerSecond))
	if obj.DLX027AverageprocessingtimeforasucceededaddressBookfilerequestinmilliseconds != None:
		print("DLX027AverageprocessingtimeforasucceededaddressBookfilerequestinmilliseconds:" + str(obj.DLX027AverageprocessingtimeforasucceededaddressBookfilerequestinmilliseconds))
	if obj.DLX027AverageprocessingtimeforasucceededaddressBookfilerequestinmilliseconds_Base != None:
		print("DLX027AverageprocessingtimeforasucceededaddressBookfilerequestinmilliseconds_Base:" + str(obj.DLX027AverageprocessingtimeforasucceededaddressBookfilerequestinmilliseconds_Base))
	if obj.DLX029FailedAddressBookFileRequests != None:
		print("DLX029FailedAddressBookFileRequests:" + str(obj.DLX029FailedAddressBookFileRequests))
	if obj.DLX030FailedAddressBookFileRequestsPerSecond != None:
		print("DLX030FailedAddressBookFileRequestsPerSecond:" + str(obj.DLX030FailedAddressBookFileRequestsPerSecond))
	if obj.DLX031Addressbooksearchrequests != None:
		print("DLX031Addressbooksearchrequests:" + str(obj.DLX031Addressbooksearchrequests))
	if obj.DLX032Succeededaddressbooksearchrequests != None:
		print("DLX032Succeededaddressbooksearchrequests:" + str(obj.DLX032Succeededaddressbooksearchrequests))
	if obj.DLX033Failedaddressbooksearchrequests != None:
		print("DLX033Failedaddressbooksearchrequests:" + str(obj.DLX033Failedaddressbooksearchrequests))
	if obj.DLX034AddressbooksearchrequestsPersec != None:
		print("DLX034AddressbooksearchrequestsPersec:" + str(obj.DLX034AddressbooksearchrequestsPersec))
	if obj.DLX035Averageprocessingtimeforaaddressbooksearchrequestsinmilliseconds != None:
		print("DLX035Averageprocessingtimeforaaddressbooksearchrequestsinmilliseconds:" + str(obj.DLX035Averageprocessingtimeforaaddressbooksearchrequestsinmilliseconds))
	if obj.DLX035Averageprocessingtimeforaaddressbooksearchrequestsinmilliseconds_Base != None:
		print("DLX035Averageprocessingtimeforaaddressbooksearchrequestsinmilliseconds_Base:" + str(obj.DLX035Averageprocessingtimeforaaddressbooksearchrequestsinmilliseconds_Base))
	if obj.DLX037AddressbookdatabasequeriesPersec != None:
		print("DLX037AddressbookdatabasequeriesPersec:" + str(obj.DLX037AddressbookdatabasequeriesPersec))
	if obj.DLX038Averageprocessingtimeforaaddressbookdatabasequeryinmilliseconds != None:
		print("DLX038Averageprocessingtimeforaaddressbookdatabasequeryinmilliseconds:" + str(obj.DLX038Averageprocessingtimeforaaddressbookdatabasequeryinmilliseconds))
	if obj.DLX038Averageprocessingtimeforaaddressbookdatabasequeryinmilliseconds_Base != None:
		print("DLX038Averageprocessingtimeforaaddressbookdatabasequeryinmilliseconds_Base:" + str(obj.DLX038Averageprocessingtimeforaaddressbookdatabasequeryinmilliseconds_Base))
	if obj.DLX040AddressbookADqueriesPersec != None:
		print("DLX040AddressbookADqueriesPersec:" + str(obj.DLX040AddressbookADqueriesPersec))
	if obj.DLX041AverageprocessingtimeforaaddressbookADqueryinmilliseconds != None:
		print("DLX041AverageprocessingtimeforaaddressbookADqueryinmilliseconds:" + str(obj.DLX041AverageprocessingtimeforaaddressbookADqueryinmilliseconds))
	if obj.DLX041AverageprocessingtimeforaaddressbookADqueryinmilliseconds_Base != None:
		print("DLX041AverageprocessingtimeforaaddressbookADqueryinmilliseconds_Base:" + str(obj.DLX041AverageprocessingtimeforaaddressbookADqueryinmilliseconds_Base))
	if obj.DLX043Addressbookprefixstringsearchrequests != None:
		print("DLX043Addressbookprefixstringsearchrequests:" + str(obj.DLX043Addressbookprefixstringsearchrequests))
	if obj.DLX044Addressbookexactstringsearchrequests != None:
		print("DLX044Addressbookexactstringsearchrequests:" + str(obj.DLX044Addressbookexactstringsearchrequests))
	if obj.DLX045AddressbookprefixDTMFsearchrequests != None:
		print("DLX045AddressbookprefixDTMFsearchrequests:" + str(obj.DLX045AddressbookprefixDTMFsearchrequests))
	if obj.DLX046AddressbookexactDTMFsearchrequests != None:
		print("DLX046AddressbookexactDTMFsearchrequests:" + str(obj.DLX046AddressbookexactDTMFsearchrequests))
	if obj.DLX047Addressbookouscopesearchrequests != None:
		print("DLX047Addressbookouscopesearchrequests:" + str(obj.DLX047Addressbookouscopesearchrequests))
	if obj.DLX048Addressbookfullscopesearchrequests != None:
		print("DLX048Addressbookfullscopesearchrequests:" + str(obj.DLX048Addressbookfullscopesearchrequests))
	if obj.DLX049AddressbookUserSidtoOuPathIdmappingcachesize != None:
		print("DLX049AddressbookUserSidtoOuPathIdmappingcachesize:" + str(obj.DLX049AddressbookUserSidtoOuPathIdmappingcachesize))
	if obj.Frequency_Object != None:
		print("Frequency_Object:" + str(obj.Frequency_Object))
	if obj.Frequency_PerfTime != None:
		print("Frequency_PerfTime:" + str(obj.Frequency_PerfTime))
	if obj.Frequency_Sys100NS != None:
		print("Frequency_Sys100NS:" + str(obj.Frequency_Sys100NS))
	if obj.Name != None:
		print("Name:" + str(obj.Name))
	if obj.Timestamp_Object != None:
		print("Timestamp_Object:" + str(obj.Timestamp_Object))
	if obj.Timestamp_PerfTime != None:
		print("Timestamp_PerfTime:" + str(obj.Timestamp_PerfTime))
	if obj.Timestamp_Sys100NS != None:
		print("Timestamp_Sys100NS:" + str(obj.Timestamp_Sys100NS))
	print("")
	print("########")
	print("")