Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » WMI Performance Counters » Python

SynchronizationNuma - WMI sample in Python

The foundations for Manageability in Windows 2019/2012/2008/ and Windows 10/8/7/Vista/XP are 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.

On this site, you can find many WMI samples.

The SynchronizationNuma WMI class can be used in ActiveXperts Network Monitor to monitor your servers.


SynchronizationNuma

Example(s)

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

for obj in objWMI:
	if obj.Caption != None:
		print("Caption:" + str(obj.Caption))
	if obj.Description != None:
		print("Description:" + str(obj.Description))
	if obj.ExecResourceAcquiresAcqExclLitePersec != None:
		print("ExecResourceAcquiresAcqExclLitePersec:" + str(obj.ExecResourceAcquiresAcqExclLitePersec))
	if obj.ExecResourceAcquiresAcqShrdLitePersec != None:
		print("ExecResourceAcquiresAcqShrdLitePersec:" + str(obj.ExecResourceAcquiresAcqShrdLitePersec))
	if obj.ExecResourceAcquiresAcqShrdStarveExclPersec != None:
		print("ExecResourceAcquiresAcqShrdStarveExclPersec:" + str(obj.ExecResourceAcquiresAcqShrdStarveExclPersec))
	if obj.ExecResourceAcquiresAcqShrdWaitForExclPersec != None:
		print("ExecResourceAcquiresAcqShrdWaitForExclPersec:" + str(obj.ExecResourceAcquiresAcqShrdWaitForExclPersec))
	if obj.ExecResourceAttemptsAcqExclLitePersec != None:
		print("ExecResourceAttemptsAcqExclLitePersec:" + str(obj.ExecResourceAttemptsAcqExclLitePersec))
	if obj.ExecResourceAttemptsAcqShrdLitePersec != None:
		print("ExecResourceAttemptsAcqShrdLitePersec:" + str(obj.ExecResourceAttemptsAcqShrdLitePersec))
	if obj.ExecResourceAttemptsAcqShrdStarveExclPersec != None:
		print("ExecResourceAttemptsAcqShrdStarveExclPersec:" + str(obj.ExecResourceAttemptsAcqShrdStarveExclPersec))
	if obj.ExecResourceAttemptsAcqShrdWaitForExclPersec != None:
		print("ExecResourceAttemptsAcqShrdWaitForExclPersec:" + str(obj.ExecResourceAttemptsAcqShrdWaitForExclPersec))
	if obj.ExecResourceBoostExclOwnerPersec != None:
		print("ExecResourceBoostExclOwnerPersec:" + str(obj.ExecResourceBoostExclOwnerPersec))
	if obj.ExecResourceBoostSharedOwnersPersec != None:
		print("ExecResourceBoostSharedOwnersPersec:" + str(obj.ExecResourceBoostSharedOwnersPersec))
	if obj.ExecResourceContentionAcqExclLitePersec != None:
		print("ExecResourceContentionAcqExclLitePersec:" + str(obj.ExecResourceContentionAcqExclLitePersec))
	if obj.ExecResourceContentionAcqShrdLitePersec != None:
		print("ExecResourceContentionAcqShrdLitePersec:" + str(obj.ExecResourceContentionAcqShrdLitePersec))
	if obj.ExecResourceContentionAcqShrdStarveExclPersec != None:
		print("ExecResourceContentionAcqShrdStarveExclPersec:" + str(obj.ExecResourceContentionAcqShrdStarveExclPersec))
	if obj.ExecResourceContentionAcqShrdWaitForExclPersec != None:
		print("ExecResourceContentionAcqShrdWaitForExclPersec:" + str(obj.ExecResourceContentionAcqShrdWaitForExclPersec))
	if obj.ExecResourcenoWaitsAcqExclLitePersec != None:
		print("ExecResourcenoWaitsAcqExclLitePersec:" + str(obj.ExecResourcenoWaitsAcqExclLitePersec))
	if obj.ExecResourcenoWaitsAcqShrdLitePersec != None:
		print("ExecResourcenoWaitsAcqShrdLitePersec:" + str(obj.ExecResourcenoWaitsAcqShrdLitePersec))
	if obj.ExecResourcenoWaitsAcqShrdStarveExclPersec != None:
		print("ExecResourcenoWaitsAcqShrdStarveExclPersec:" + str(obj.ExecResourcenoWaitsAcqShrdStarveExclPersec))
	if obj.ExecResourcenoWaitsAcqShrdWaitForExclPersec != None:
		print("ExecResourcenoWaitsAcqShrdWaitForExclPersec:" + str(obj.ExecResourcenoWaitsAcqShrdWaitForExclPersec))
	if obj.ExecResourceRecursiveExclAcquiresAcqExclLitePersec != None:
		print("ExecResourceRecursiveExclAcquiresAcqExclLitePersec:" + str(obj.ExecResourceRecursiveExclAcquiresAcqExclLitePersec))
	if obj.ExecResourceRecursiveExclAcquiresAcqShrdLitePersec != None:
		print("ExecResourceRecursiveExclAcquiresAcqShrdLitePersec:" + str(obj.ExecResourceRecursiveExclAcquiresAcqShrdLitePersec))
	if obj.ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec != None:
		print("ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec:" + str(obj.ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec))
	if obj.ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec != None:
		print("ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec:" + str(obj.ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec))
	if obj.ExecResourceRecursiveShAcquiresAcqShrdLitePersec != None:
		print("ExecResourceRecursiveShAcquiresAcqShrdLitePersec:" + str(obj.ExecResourceRecursiveShAcquiresAcqShrdLitePersec))
	if obj.ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec != None:
		print("ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec:" + str(obj.ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec))
	if obj.ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec != None:
		print("ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec:" + str(obj.ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec))
	if obj.ExecResourceSetOwnerPointerExclusivePersec != None:
		print("ExecResourceSetOwnerPointerExclusivePersec:" + str(obj.ExecResourceSetOwnerPointerExclusivePersec))
	if obj.ExecResourceSetOwnerPointerSharedExistingOwnerPersec != None:
		print("ExecResourceSetOwnerPointerSharedExistingOwnerPersec:" + str(obj.ExecResourceSetOwnerPointerSharedExistingOwnerPersec))
	if obj.ExecResourceSetOwnerPointerSharedNewOwnerPersec != None:
		print("ExecResourceSetOwnerPointerSharedNewOwnerPersec:" + str(obj.ExecResourceSetOwnerPointerSharedNewOwnerPersec))
	if obj.ExecResourceTotalAcquiresPersec != None:
		print("ExecResourceTotalAcquiresPersec:" + str(obj.ExecResourceTotalAcquiresPersec))
	if obj.ExecResourceTotalContentionsPersec != None:
		print("ExecResourceTotalContentionsPersec:" + str(obj.ExecResourceTotalContentionsPersec))
	if obj.ExecResourceTotalConvExclusiveToSharedPersec != None:
		print("ExecResourceTotalConvExclusiveToSharedPersec:" + str(obj.ExecResourceTotalConvExclusiveToSharedPersec))
	if obj.ExecResourceTotalDeletePersec != None:
		print("ExecResourceTotalDeletePersec:" + str(obj.ExecResourceTotalDeletePersec))
	if obj.ExecResourceTotalExclusiveReleasesPersec != None:
		print("ExecResourceTotalExclusiveReleasesPersec:" + str(obj.ExecResourceTotalExclusiveReleasesPersec))
	if obj.ExecResourceTotalInitializePersec != None:
		print("ExecResourceTotalInitializePersec:" + str(obj.ExecResourceTotalInitializePersec))
	if obj.ExecResourceTotalReInitializePersec != None:
		print("ExecResourceTotalReInitializePersec:" + str(obj.ExecResourceTotalReInitializePersec))
	if obj.ExecResourceTotalSharedReleasesPersec != None:
		print("ExecResourceTotalSharedReleasesPersec:" + str(obj.ExecResourceTotalSharedReleasesPersec))
	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.IPISendBroadcastRequestsPersec != None:
		print("IPISendBroadcastRequestsPersec:" + str(obj.IPISendBroadcastRequestsPersec))
	if obj.IPISendRoutineRequestsPersec != None:
		print("IPISendRoutineRequestsPersec:" + str(obj.IPISendRoutineRequestsPersec))
	if obj.IPISendSoftwareInterruptsPersec != None:
		print("IPISendSoftwareInterruptsPersec:" + str(obj.IPISendSoftwareInterruptsPersec))
	if obj.Name != None:
		print("Name:" + str(obj.Name))
	if obj.SpinlockAcquiresPersec != None:
		print("SpinlockAcquiresPersec:" + str(obj.SpinlockAcquiresPersec))
	if obj.SpinlockContentionsPersec != None:
		print("SpinlockContentionsPersec:" + str(obj.SpinlockContentionsPersec))
	if obj.SpinlockSpinsPersec != None:
		print("SpinlockSpinsPersec:" + str(obj.SpinlockSpinsPersec))
	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("")