Contact Info

Crumbtrail

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

Win32_PerfRawData_CallControlServerPerf 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_CallControlServerPerf 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_CallControlServerPerf_LCCCS00TPCPProcessing')

for obj in objWMI:
	if obj.Caption != None:
		print("Caption:" + str(obj.Caption))
	if obj.CCS000TotalTPCPMessagesReceived != None:
		print("CCS000TotalTPCPMessagesReceived:" + str(obj.CCS000TotalTPCPMessagesReceived))
	if obj.CCS001TotalChannelsAccepted != None:
		print("CCS001TotalChannelsAccepted:" + str(obj.CCS001TotalChannelsAccepted))
	if obj.CCS002ActiveChannels != None:
		print("CCS002ActiveChannels:" + str(obj.CCS002ActiveChannels))
	if obj.CCS003ActiveDTMChannels != None:
		print("CCS003ActiveDTMChannels:" + str(obj.CCS003ActiveDTMChannels))
	if obj.CCS004ActiveSTMChannels != None:
		print("CCS004ActiveSTMChannels:" + str(obj.CCS004ActiveSTMChannels))
	if obj.CCS005TotalConversationsAccepted != None:
		print("CCS005TotalConversationsAccepted:" + str(obj.CCS005TotalConversationsAccepted))
	if obj.CCS006ActiveConversations != None:
		print("CCS006ActiveConversations:" + str(obj.CCS006ActiveConversations))
	if obj.CCS007ActiveIncomingConversations != None:
		print("CCS007ActiveIncomingConversations:" + str(obj.CCS007ActiveIncomingConversations))
	if obj.CCS008ActiveOutgoingConversations != None:
		print("CCS008ActiveOutgoingConversations:" + str(obj.CCS008ActiveOutgoingConversations))
	if obj.CCS009TotalSuccessfulConversations != None:
		print("CCS009TotalSuccessfulConversations:" + str(obj.CCS009TotalSuccessfulConversations))
	if obj.CCS010TotalFailedConversations != None:
		print("CCS010TotalFailedConversations:" + str(obj.CCS010TotalFailedConversations))
	if obj.CCS011ConnectedConversations != None:
		print("CCS011ConnectedConversations:" + str(obj.CCS011ConnectedConversations))
	if obj.CCS012TotalSIPSDPlessINVITEToGatewayFailed != None:
		print("CCS012TotalSIPSDPlessINVITEToGatewayFailed:" + str(obj.CCS012TotalSIPSDPlessINVITEToGatewayFailed))
	if obj.CCS013TotalSIPSelfREFERToGatewayFailed != None:
		print("CCS013TotalSIPSelfREFERToGatewayFailed:" + str(obj.CCS013TotalSIPSelfREFERToGatewayFailed))
	if obj.CCS014TotalSIPINVITEFailedToGateway != None:
		print("CCS014TotalSIPINVITEFailedToGateway:" + str(obj.CCS014TotalSIPINVITEFailedToGateway))
	if obj.CCS015TotalSIPINVITEFailedToProxy != None:
		print("CCS015TotalSIPINVITEFailedToProxy:" + str(obj.CCS015TotalSIPINVITEFailedToProxy))
	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("")