Contact Info

Crumbtrail

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

Win32_PerfRawData_IMMcuPerf 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_IMMcuPerf 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_IMMcuPerf_LCImMcu00IMMcuConferences')

for obj in objWMI:
	if obj.Caption != None:
		print("Caption:" + str(obj.Caption))
	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.IMMCU000ActiveConferences != None:
		print("IMMCU000ActiveConferences:" + str(obj.IMMCU000ActiveConferences))
	if obj.IMMCU001ConnectedUsers != None:
		print("IMMCU001ConnectedUsers:" + str(obj.IMMCU001ConnectedUsers))
	if obj.IMMCU002ConnectedDialinUsers != None:
		print("IMMCU002ConnectedDialinUsers:" + str(obj.IMMCU002ConnectedDialinUsers))
	if obj.IMMCU003ConnectedDialoutUsers != None:
		print("IMMCU003ConnectedDialoutUsers:" + str(obj.IMMCU003ConnectedDialoutUsers))
	if obj.IMMCU004IncomingMessages != None:
		print("IMMCU004IncomingMessages:" + str(obj.IMMCU004IncomingMessages))
	if obj.IMMCU005IncomingMessagespersec != None:
		print("IMMCU005IncomingMessagespersec:" + str(obj.IMMCU005IncomingMessagespersec))
	if obj.IMMCU006OutgoingMessages != None:
		print("IMMCU006OutgoingMessages:" + str(obj.IMMCU006OutgoingMessages))
	if obj.IMMCU007OutgoingMessagespersec != None:
		print("IMMCU007OutgoingMessagespersec:" + str(obj.IMMCU007OutgoingMessagespersec))
	if obj.IMMCU008AverageMessageSize != None:
		print("IMMCU008AverageMessageSize:" + str(obj.IMMCU008AverageMessageSize))
	if obj.IMMCU008AverageMessageSize_Base != None:
		print("IMMCU008AverageMessageSize_Base:" + str(obj.IMMCU008AverageMessageSize_Base))
	if obj.IMMCU010MessageForwardErrors != None:
		print("IMMCU010MessageForwardErrors:" + str(obj.IMMCU010MessageForwardErrors))
	if obj.IMMCU011MessageForwardErrorspersec != None:
		print("IMMCU011MessageForwardErrorspersec:" + str(obj.IMMCU011MessageForwardErrorspersec))
	if obj.IMMCU012IncomingInfos != None:
		print("IMMCU012IncomingInfos:" + str(obj.IMMCU012IncomingInfos))
	if obj.IMMCU013IncomingInfospersec != None:
		print("IMMCU013IncomingInfospersec:" + str(obj.IMMCU013IncomingInfospersec))
	if obj.IMMCU014OutgoingInfos != None:
		print("IMMCU014OutgoingInfos:" + str(obj.IMMCU014OutgoingInfos))
	if obj.IMMCU015OutgoingInfospersec != None:
		print("IMMCU015OutgoingInfospersec:" + str(obj.IMMCU015OutgoingInfospersec))
	if obj.IMMCU016AverageInfoSize != None:
		print("IMMCU016AverageInfoSize:" + str(obj.IMMCU016AverageInfoSize))
	if obj.IMMCU016AverageInfoSize_Base != None:
		print("IMMCU016AverageInfoSize_Base:" + str(obj.IMMCU016AverageInfoSize_Base))
	if obj.IMMCU018InfoForwardErrors != None:
		print("IMMCU018InfoForwardErrors:" + str(obj.IMMCU018InfoForwardErrors))
	if obj.IMMCU019InfoForwardErrorspersec != None:
		print("IMMCU019InfoForwardErrorspersec:" + str(obj.IMMCU019InfoForwardErrorspersec))
	if obj.IMMCU020ThrottledSipConnections != None:
		print("IMMCU020ThrottledSipConnections:" + str(obj.IMMCU020ThrottledSipConnections))
	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("")