Contact Info

Crumbtrail

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

Win32_PerfFormattedData_ClientVersionFilterPerf 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_PerfFormattedData_ClientVersionFilterPerf 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_PerfFormattedData_ClientVersionFilterPerf_LCClientVersionFilter00ClientVersionFilter')

for obj in objWMI:
	if obj.Caption != None:
		print("Caption:" + str(obj.Caption))
	if obj.ClientVersionFilter000MessagesProcessed != None:
		print("ClientVersionFilter000MessagesProcessed:" + str(obj.ClientVersionFilter000MessagesProcessed))
	if obj.ClientVersionFilter001Sessionsblockwithpromptresponse != None:
		print("ClientVersionFilter001Sessionsblockwithpromptresponse:" + str(obj.ClientVersionFilter001Sessionsblockwithpromptresponse))
	if obj.ClientVersionFilter002Sessionsblockwithurlresponse != None:
		print("ClientVersionFilter002Sessionsblockwithurlresponse:" + str(obj.ClientVersionFilter002Sessionsblockwithurlresponse))
	if obj.ClientVersionFilter003Sessionsblockwithdynamicurlresponse != None:
		print("ClientVersionFilter003Sessionsblockwithdynamicurlresponse:" + str(obj.ClientVersionFilter003Sessionsblockwithdynamicurlresponse))
	if obj.ClientVersionFilter004Sessionsallowwithdynamicurlresponse != None:
		print("ClientVersionFilter004Sessionsallowwithdynamicurlresponse:" + str(obj.ClientVersionFilter004Sessionsallowwithdynamicurlresponse))
	if obj.ClientVersionFilter005ActiveMessageObjects != None:
		print("ClientVersionFilter005ActiveMessageObjects:" + str(obj.ClientVersionFilter005ActiveMessageObjects))
	if obj.ClientVersionFilter006ThrottlingModeActive != None:
		print("ClientVersionFilter006ThrottlingModeActive:" + str(obj.ClientVersionFilter006ThrottlingModeActive))
	if obj.ClientVersionFilter007LocallyGenerated503Responses != None:
		print("ClientVersionFilter007LocallyGenerated503Responses:" + str(obj.ClientVersionFilter007LocallyGenerated503Responses))
	if obj.ClientVersionFilter008LocallyGenerated400Responses != None:
		print("ClientVersionFilter008LocallyGenerated400Responses:" + str(obj.ClientVersionFilter008LocallyGenerated400Responses))
	if obj.Description != None:
		print("Description:" + str(obj.Description))
	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("")