Contact Info

Crumbtrail

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

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


HyperVHypervisorRootVirtualProcessor

Example(s)

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

for obj in objWMI:
	if obj.AddressDomainFlushesPersec != None:
		print("AddressDomainFlushesPersec:" + str(obj.AddressDomainFlushesPersec))
	if obj.AddressSpaceEvictionsPersec != None:
		print("AddressSpaceEvictionsPersec:" + str(obj.AddressSpaceEvictionsPersec))
	if obj.AddressSpaceFlushesPersec != None:
		print("AddressSpaceFlushesPersec:" + str(obj.AddressSpaceFlushesPersec))
	if obj.AddressSpaceSwitchesPersec != None:
		print("AddressSpaceSwitchesPersec:" + str(obj.AddressSpaceSwitchesPersec))
	if obj.APICEOIAccessesPersec != None:
		print("APICEOIAccessesPersec:" + str(obj.APICEOIAccessesPersec))
	if obj.APICIPIsSentPersec != None:
		print("APICIPIsSentPersec:" + str(obj.APICIPIsSentPersec))
	if obj.APICMMIOAccessesPersec != None:
		print("APICMMIOAccessesPersec:" + str(obj.APICMMIOAccessesPersec))
	if obj.APICSelfIPIsSentPersec != None:
		print("APICSelfIPIsSentPersec:" + str(obj.APICSelfIPIsSentPersec))
	if obj.APICTPRAccessesPersec != None:
		print("APICTPRAccessesPersec:" + str(obj.APICTPRAccessesPersec))
	if obj.Caption != None:
		print("Caption:" + str(obj.Caption))
	if obj.ControlRegisterAccessesCost != None:
		print("ControlRegisterAccessesCost:" + str(obj.ControlRegisterAccessesCost))
	if obj.ControlRegisterAccessesPersec != None:
		print("ControlRegisterAccessesPersec:" + str(obj.ControlRegisterAccessesPersec))
	if obj.CPUIDInstructionsCost != None:
		print("CPUIDInstructionsCost:" + str(obj.CPUIDInstructionsCost))
	if obj.CPUIDInstructionsPersec != None:
		print("CPUIDInstructionsPersec:" + str(obj.CPUIDInstructionsPersec))
	if obj.DebugRegisterAccessesCost != None:
		print("DebugRegisterAccessesCost:" + str(obj.DebugRegisterAccessesCost))
	if obj.DebugRegisterAccessesPersec != None:
		print("DebugRegisterAccessesPersec:" + str(obj.DebugRegisterAccessesPersec))
	if obj.Description != None:
		print("Description:" + str(obj.Description))
	if obj.EmulatedInstructionsCost != None:
		print("EmulatedInstructionsCost:" + str(obj.EmulatedInstructionsCost))
	if obj.EmulatedInstructionsPersec != None:
		print("EmulatedInstructionsPersec:" + str(obj.EmulatedInstructionsPersec))
	if obj.ExternalInterruptsCost != None:
		print("ExternalInterruptsCost:" + str(obj.ExternalInterruptsCost))
	if obj.ExternalInterruptsPersec != None:
		print("ExternalInterruptsPersec:" + str(obj.ExternalInterruptsPersec))
	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.GlobalGVARangeFlushesPersec != None:
		print("GlobalGVARangeFlushesPersec:" + str(obj.GlobalGVARangeFlushesPersec))
	if obj.GPASpaceHypercallsPersec != None:
		print("GPASpaceHypercallsPersec:" + str(obj.GPASpaceHypercallsPersec))
	if obj.GuestPageTableMapsPersec != None:
		print("GuestPageTableMapsPersec:" + str(obj.GuestPageTableMapsPersec))
	if obj.HLTInstructionsCost != None:
		print("HLTInstructionsCost:" + str(obj.HLTInstructionsCost))
	if obj.HLTInstructionsPersec != None:
		print("HLTInstructionsPersec:" + str(obj.HLTInstructionsPersec))
	if obj.HypercallsCost != None:
		print("HypercallsCost:" + str(obj.HypercallsCost))
	if obj.HypercallsPersec != None:
		print("HypercallsPersec:" + str(obj.HypercallsPersec))
	if obj.IOInstructionsCost != None:
		print("IOInstructionsCost:" + str(obj.IOInstructionsCost))
	if obj.IOInstructionsPersec != None:
		print("IOInstructionsPersec:" + str(obj.IOInstructionsPersec))
	if obj.IOInterceptMessagesPersec != None:
		print("IOInterceptMessagesPersec:" + str(obj.IOInterceptMessagesPersec))
	if obj.LargePageTLBFillsPersec != None:
		print("LargePageTLBFillsPersec:" + str(obj.LargePageTLBFillsPersec))
	if obj.LocalFlushedGVARangesPersec != None:
		print("LocalFlushedGVARangesPersec:" + str(obj.LocalFlushedGVARangesPersec))
	if obj.LogicalProcessorHypercallsPersec != None:
		print("LogicalProcessorHypercallsPersec:" + str(obj.LogicalProcessorHypercallsPersec))
	if obj.LogicalProcessorMigrationsPersec != None:
		print("LogicalProcessorMigrationsPersec:" + str(obj.LogicalProcessorMigrationsPersec))
	if obj.LongSpinWaitHypercallsPersec != None:
		print("LongSpinWaitHypercallsPersec:" + str(obj.LongSpinWaitHypercallsPersec))
	if obj.MemoryInterceptMessagesPersec != None:
		print("MemoryInterceptMessagesPersec:" + str(obj.MemoryInterceptMessagesPersec))
	if obj.MSRAccessesCost != None:
		print("MSRAccessesCost:" + str(obj.MSRAccessesCost))
	if obj.MSRAccessesPersec != None:
		print("MSRAccessesPersec:" + str(obj.MSRAccessesPersec))
	if obj.MWAITInstructionsCost != None:
		print("MWAITInstructionsCost:" + str(obj.MWAITInstructionsCost))
	if obj.MWAITInstructionsPersec != None:
		print("MWAITInstructionsPersec:" + str(obj.MWAITInstructionsPersec))
	if obj.Name != None:
		print("Name:" + str(obj.Name))
	if obj.OtherHypercallsPersec != None:
		print("OtherHypercallsPersec:" + str(obj.OtherHypercallsPersec))
	if obj.OtherInterceptsCost != None:
		print("OtherInterceptsCost:" + str(obj.OtherInterceptsCost))
	if obj.OtherInterceptsPersec != None:
		print("OtherInterceptsPersec:" + str(obj.OtherInterceptsPersec))
	if obj.OtherMessagesPersec != None:
		print("OtherMessagesPersec:" + str(obj.OtherMessagesPersec))
	if obj.PageFaultInterceptsCost != None:
		print("PageFaultInterceptsCost:" + str(obj.PageFaultInterceptsCost))
	if obj.PageFaultInterceptsPersec != None:
		print("PageFaultInterceptsPersec:" + str(obj.PageFaultInterceptsPersec))
	if obj.PageInvalidationsCost != None:
		print("PageInvalidationsCost:" + str(obj.PageInvalidationsCost))
	if obj.PageInvalidationsPersec != None:
		print("PageInvalidationsPersec:" + str(obj.PageInvalidationsPersec))
	if obj.PageTableAllocationsPersec != None:
		print("PageTableAllocationsPersec:" + str(obj.PageTableAllocationsPersec))
	if obj.PageTableEvictionPersecs != None:
		print("PageTableEvictionPersecs:" + str(obj.PageTableEvictionPersecs))
	if obj.PageTableReclamationsPersec != None:
		print("PageTableReclamationsPersec:" + str(obj.PageTableReclamationsPersec))
	if obj.PageTableResetsPersec != None:
		print("PageTableResetsPersec:" + str(obj.PageTableResetsPersec))
	if obj.PageTableValidationsPersec != None:
		print("PageTableValidationsPersec:" + str(obj.PageTableValidationsPersec))
	if obj.PageTableWriteInterceptsPersec != None:
		print("PageTableWriteInterceptsPersec:" + str(obj.PageTableWriteInterceptsPersec))
	if obj.PendingInterruptsCost != None:
		print("PendingInterruptsCost:" + str(obj.PendingInterruptsCost))
	if obj.PendingInterruptsPersec != None:
		print("PendingInterruptsPersec:" + str(obj.PendingInterruptsPersec))
	if obj.PercentGuestRunTime != None:
		print("PercentGuestRunTime:" + str(obj.PercentGuestRunTime))
	if obj.PercentHypervisorRunTime != None:
		print("PercentHypervisorRunTime:" + str(obj.PercentHypervisorRunTime))
	if obj.PercentTotalRunTime != None:
		print("PercentTotalRunTime:" + str(obj.PercentTotalRunTime))
	if obj.ReflectedGuestPageFaultsPersec != None:
		print("ReflectedGuestPageFaultsPersec:" + str(obj.ReflectedGuestPageFaultsPersec))
	if obj.SmallPageTLBFillsPersec != None:
		print("SmallPageTLBFillsPersec:" + str(obj.SmallPageTLBFillsPersec))
	if obj.SyntheticInterruptHypercallsPersec != None:
		print("SyntheticInterruptHypercallsPersec:" + str(obj.SyntheticInterruptHypercallsPersec))
	if obj.SyntheticInterruptsPersec != None:
		print("SyntheticInterruptsPersec:" + str(obj.SyntheticInterruptsPersec))
	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))
	if obj.TotalInterceptsCost != None:
		print("TotalInterceptsCost:" + str(obj.TotalInterceptsCost))
	if obj.TotalInterceptsPersec != None:
		print("TotalInterceptsPersec:" + str(obj.TotalInterceptsPersec))
	if obj.TotalMessagesPersec != None:
		print("TotalMessagesPersec:" + str(obj.TotalMessagesPersec))
	if obj.VirtualInterruptHypercallsPersec != None:
		print("VirtualInterruptHypercallsPersec:" + str(obj.VirtualInterruptHypercallsPersec))
	if obj.VirtualInterruptsPersec != None:
		print("VirtualInterruptsPersec:" + str(obj.VirtualInterruptsPersec))
	if obj.VirtualMMUHypercallsPersec != None:
		print("VirtualMMUHypercallsPersec:" + str(obj.VirtualMMUHypercallsPersec))
	if obj.VirtualProcessorHypercallsPersec != None:
		print("VirtualProcessorHypercallsPersec:" + str(obj.VirtualProcessorHypercallsPersec))
	print("")
	print("########")
	print("")