Win32_PerfFormattedData_DirectoryServices 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_DirectoryServices 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_DirectoryServices_DirectoryServices')
for obj in objWMI:
if obj.ABANRPersec != None:
print("ABANRPersec:" + str(obj.ABANRPersec))
if obj.ABBrowsesPersec != None:
print("ABBrowsesPersec:" + str(obj.ABBrowsesPersec))
if obj.ABClientSessions != None:
print("ABClientSessions:" + str(obj.ABClientSessions))
if obj.ABMatchesPersec != None:
print("ABMatchesPersec:" + str(obj.ABMatchesPersec))
if obj.ABPropertyReadsPersec != None:
print("ABPropertyReadsPersec:" + str(obj.ABPropertyReadsPersec))
if obj.ABProxyLookupsPersec != None:
print("ABProxyLookupsPersec:" + str(obj.ABProxyLookupsPersec))
if obj.ABSearchesPersec != None:
print("ABSearchesPersec:" + str(obj.ABSearchesPersec))
if obj.ATQEstimatedQueueDelay != None:
print("ATQEstimatedQueueDelay:" + str(obj.ATQEstimatedQueueDelay))
if obj.ATQOutstandingQueuedRequests != None:
print("ATQOutstandingQueuedRequests:" + str(obj.ATQOutstandingQueuedRequests))
if obj.ATQRequestLatency != None:
print("ATQRequestLatency:" + str(obj.ATQRequestLatency))
if obj.ATQThreadsLDAP != None:
print("ATQThreadsLDAP:" + str(obj.ATQThreadsLDAP))
if obj.ATQThreadsOther != None:
print("ATQThreadsOther:" + str(obj.ATQThreadsOther))
if obj.ATQThreadsTotal != None:
print("ATQThreadsTotal:" + str(obj.ATQThreadsTotal))
if obj.BasesearchesPersec != None:
print("BasesearchesPersec:" + str(obj.BasesearchesPersec))
if obj.Caption != None:
print("Caption:" + str(obj.Caption))
if obj.DatabaseaddsPersec != None:
print("DatabaseaddsPersec:" + str(obj.DatabaseaddsPersec))
if obj.DatabasedeletesPersec != None:
print("DatabasedeletesPersec:" + str(obj.DatabasedeletesPersec))
if obj.DatabasemodifysPersec != None:
print("DatabasemodifysPersec:" + str(obj.DatabasemodifysPersec))
if obj.Description != None:
print("Description:" + str(obj.Description))
if obj.DigestBindsPersec != None:
print("DigestBindsPersec:" + str(obj.DigestBindsPersec))
if obj.DRAHighestUSNCommittedHighpart != None:
print("DRAHighestUSNCommittedHighpart:" + str(obj.DRAHighestUSNCommittedHighpart))
if obj.DRAHighestUSNCommittedLowpart != None:
print("DRAHighestUSNCommittedLowpart:" + str(obj.DRAHighestUSNCommittedLowpart))
if obj.DRAHighestUSNIssuedHighpart != None:
print("DRAHighestUSNIssuedHighpart:" + str(obj.DRAHighestUSNIssuedHighpart))
if obj.DRAHighestUSNIssuedLowpart != None:
print("DRAHighestUSNIssuedLowpart:" + str(obj.DRAHighestUSNIssuedLowpart))
if obj.DRAInboundBytesCompressedBetweenSitesAfterCompressionPersec != None:
print("DRAInboundBytesCompressedBetweenSitesAfterCompressionPersec:" + str(obj.DRAInboundBytesCompressedBetweenSitesAfterCompressionPersec))
if obj.DRAInboundBytesCompressedBetweenSitesAfterCompressionSinceBoot != None:
print("DRAInboundBytesCompressedBetweenSitesAfterCompressionSinceBoot:" + str(obj.DRAInboundBytesCompressedBetweenSitesAfterCompressionSinceBoot))
if obj.DRAInboundBytesCompressedBetweenSitesBeforeCompressionPersec != None:
print("DRAInboundBytesCompressedBetweenSitesBeforeCompressionPersec:" + str(obj.DRAInboundBytesCompressedBetweenSitesBeforeCompressionPersec))
if obj.DRAInboundBytesCompressedBetweenSitesBeforeCompressionSinceBoot != None:
print("DRAInboundBytesCompressedBetweenSitesBeforeCompressionSinceBoot:" + str(obj.DRAInboundBytesCompressedBetweenSitesBeforeCompressionSinceBoot))
if obj.DRAInboundBytesNotCompressedWithinSitePersec != None:
print("DRAInboundBytesNotCompressedWithinSitePersec:" + str(obj.DRAInboundBytesNotCompressedWithinSitePersec))
if obj.DRAInboundBytesNotCompressedWithinSiteSinceBoot != None:
print("DRAInboundBytesNotCompressedWithinSiteSinceBoot:" + str(obj.DRAInboundBytesNotCompressedWithinSiteSinceBoot))
if obj.DRAInboundBytesTotalPersec != None:
print("DRAInboundBytesTotalPersec:" + str(obj.DRAInboundBytesTotalPersec))
if obj.DRAInboundBytesTotalSinceBoot != None:
print("DRAInboundBytesTotalSinceBoot:" + str(obj.DRAInboundBytesTotalSinceBoot))
if obj.DRAInboundFullSyncObjectsRemaining != None:
print("DRAInboundFullSyncObjectsRemaining:" + str(obj.DRAInboundFullSyncObjectsRemaining))
if obj.DRAInboundLinkValueUpdatesRemaininginPacket != None:
print("DRAInboundLinkValueUpdatesRemaininginPacket:" + str(obj.DRAInboundLinkValueUpdatesRemaininginPacket))
if obj.DRAInboundObjectsAppliedPersec != None:
print("DRAInboundObjectsAppliedPersec:" + str(obj.DRAInboundObjectsAppliedPersec))
if obj.DRAInboundObjectsFilteredPersec != None:
print("DRAInboundObjectsFilteredPersec:" + str(obj.DRAInboundObjectsFilteredPersec))
if obj.DRAInboundObjectsPersec != None:
print("DRAInboundObjectsPersec:" + str(obj.DRAInboundObjectsPersec))
if obj.DRAInboundObjectUpdatesRemaininginPacket != None:
print("DRAInboundObjectUpdatesRemaininginPacket:" + str(obj.DRAInboundObjectUpdatesRemaininginPacket))
if obj.DRAInboundPropertiesAppliedPersec != None:
print("DRAInboundPropertiesAppliedPersec:" + str(obj.DRAInboundPropertiesAppliedPersec))
if obj.DRAInboundPropertiesFilteredPersec != None:
print("DRAInboundPropertiesFilteredPersec:" + str(obj.DRAInboundPropertiesFilteredPersec))
if obj.DRAInboundPropertiesTotalPersec != None:
print("DRAInboundPropertiesTotalPersec:" + str(obj.DRAInboundPropertiesTotalPersec))
if obj.DRAInboundTotalUpdatesRemaininginPacket != None:
print("DRAInboundTotalUpdatesRemaininginPacket:" + str(obj.DRAInboundTotalUpdatesRemaininginPacket))
if obj.DRAInboundValuesDNsonlyPersec != None:
print("DRAInboundValuesDNsonlyPersec:" + str(obj.DRAInboundValuesDNsonlyPersec))
if obj.DRAInboundValuesTotalPersec != None:
print("DRAInboundValuesTotalPersec:" + str(obj.DRAInboundValuesTotalPersec))
if obj.DRAOutboundBytesCompressedBetweenSitesAfterCompressionPersec != None:
print("DRAOutboundBytesCompressedBetweenSitesAfterCompressionPersec:" + str(obj.DRAOutboundBytesCompressedBetweenSitesAfterCompressionPersec))
if obj.DRAOutboundBytesCompressedBetweenSitesAfterCompressionSinceBoot != None:
print("DRAOutboundBytesCompressedBetweenSitesAfterCompressionSinceBoot:" + str(obj.DRAOutboundBytesCompressedBetweenSitesAfterCompressionSinceBoot))
if obj.DRAOutboundBytesCompressedBetweenSitesBeforeCompressionPersec != None:
print("DRAOutboundBytesCompressedBetweenSitesBeforeCompressionPersec:" + str(obj.DRAOutboundBytesCompressedBetweenSitesBeforeCompressionPersec))
if obj.DRAOutboundBytesCompressedBetweenSitesBeforeCompressionSinceBoot != None:
print("DRAOutboundBytesCompressedBetweenSitesBeforeCompressionSinceBoot:" + str(obj.DRAOutboundBytesCompressedBetweenSitesBeforeCompressionSinceBoot))
if obj.DRAOutboundBytesNotCompressedWithinSitePersec != None:
print("DRAOutboundBytesNotCompressedWithinSitePersec:" + str(obj.DRAOutboundBytesNotCompressedWithinSitePersec))
if obj.DRAOutboundBytesNotCompressedWithinSiteSinceBoot != None:
print("DRAOutboundBytesNotCompressedWithinSiteSinceBoot:" + str(obj.DRAOutboundBytesNotCompressedWithinSiteSinceBoot))
if obj.DRAOutboundBytesTotalPersec != None:
print("DRAOutboundBytesTotalPersec:" + str(obj.DRAOutboundBytesTotalPersec))
if obj.DRAOutboundBytesTotalSinceBoot != None:
print("DRAOutboundBytesTotalSinceBoot:" + str(obj.DRAOutboundBytesTotalSinceBoot))
if obj.DRAOutboundObjectsFilteredPersec != None:
print("DRAOutboundObjectsFilteredPersec:" + str(obj.DRAOutboundObjectsFilteredPersec))
if obj.DRAOutboundObjectsPersec != None:
print("DRAOutboundObjectsPersec:" + str(obj.DRAOutboundObjectsPersec))
if obj.DRAOutboundPropertiesPersec != None:
print("DRAOutboundPropertiesPersec:" + str(obj.DRAOutboundPropertiesPersec))
if obj.DRAOutboundValuesDNsonlyPersec != None:
print("DRAOutboundValuesDNsonlyPersec:" + str(obj.DRAOutboundValuesDNsonlyPersec))
if obj.DRAOutboundValuesTotalPersec != None:
print("DRAOutboundValuesTotalPersec:" + str(obj.DRAOutboundValuesTotalPersec))
if obj.DRAPendingReplicationOperations != None:
print("DRAPendingReplicationOperations:" + str(obj.DRAPendingReplicationOperations))
if obj.DRAPendingReplicationSynchronizations != None:
print("DRAPendingReplicationSynchronizations:" + str(obj.DRAPendingReplicationSynchronizations))
if obj.DRASyncFailuresonSchemaMismatch != None:
print("DRASyncFailuresonSchemaMismatch:" + str(obj.DRASyncFailuresonSchemaMismatch))
if obj.DRASyncRequestsMade != None:
print("DRASyncRequestsMade:" + str(obj.DRASyncRequestsMade))
if obj.DRASyncRequestsSuccessful != None:
print("DRASyncRequestsSuccessful:" + str(obj.DRASyncRequestsSuccessful))
if obj.DRAThreadsGettingNCChanges != None:
print("DRAThreadsGettingNCChanges:" + str(obj.DRAThreadsGettingNCChanges))
if obj.DRAThreadsGettingNCChangesHoldingSemaphore != None:
print("DRAThreadsGettingNCChangesHoldingSemaphore:" + str(obj.DRAThreadsGettingNCChangesHoldingSemaphore))
if obj.DSClientBindsPersec != None:
print("DSClientBindsPersec:" + str(obj.DSClientBindsPersec))
if obj.DSClientNameTranslationsPersec != None:
print("DSClientNameTranslationsPersec:" + str(obj.DSClientNameTranslationsPersec))
if obj.DSDirectoryReadsPersec != None:
print("DSDirectoryReadsPersec:" + str(obj.DSDirectoryReadsPersec))
if obj.DSDirectorySearchesPersec != None:
print("DSDirectorySearchesPersec:" + str(obj.DSDirectorySearchesPersec))
if obj.DSDirectoryWritesPersec != None:
print("DSDirectoryWritesPersec:" + str(obj.DSDirectoryWritesPersec))
if obj.DSMonitorListSize != None:
print("DSMonitorListSize:" + str(obj.DSMonitorListSize))
if obj.DSNameCachehitrate != None:
print("DSNameCachehitrate:" + str(obj.DSNameCachehitrate))
if obj.DSNotifyQueueSize != None:
print("DSNotifyQueueSize:" + str(obj.DSNotifyQueueSize))
if obj.DSPercentReadsfromDRA != None:
print("DSPercentReadsfromDRA:" + str(obj.DSPercentReadsfromDRA))
if obj.DSPercentReadsfromKCC != None:
print("DSPercentReadsfromKCC:" + str(obj.DSPercentReadsfromKCC))
if obj.DSPercentReadsfromLSA != None:
print("DSPercentReadsfromLSA:" + str(obj.DSPercentReadsfromLSA))
if obj.DSPercentReadsfromNSPI != None:
print("DSPercentReadsfromNSPI:" + str(obj.DSPercentReadsfromNSPI))
if obj.DSPercentReadsfromNTDSAPI != None:
print("DSPercentReadsfromNTDSAPI:" + str(obj.DSPercentReadsfromNTDSAPI))
if obj.DSPercentReadsfromSAM != None:
print("DSPercentReadsfromSAM:" + str(obj.DSPercentReadsfromSAM))
if obj.DSPercentReadsOther != None:
print("DSPercentReadsOther:" + str(obj.DSPercentReadsOther))
if obj.DSPercentSearchesfromDRA != None:
print("DSPercentSearchesfromDRA:" + str(obj.DSPercentSearchesfromDRA))
if obj.DSPercentSearchesfromKCC != None:
print("DSPercentSearchesfromKCC:" + str(obj.DSPercentSearchesfromKCC))
if obj.DSPercentSearchesfromLDAP != None:
print("DSPercentSearchesfromLDAP:" + str(obj.DSPercentSearchesfromLDAP))
if obj.DSPercentSearchesfromLSA != None:
print("DSPercentSearchesfromLSA:" + str(obj.DSPercentSearchesfromLSA))
if obj.DSPercentSearchesfromNSPI != None:
print("DSPercentSearchesfromNSPI:" + str(obj.DSPercentSearchesfromNSPI))
if obj.DSPercentSearchesfromNTDSAPI != None:
print("DSPercentSearchesfromNTDSAPI:" + str(obj.DSPercentSearchesfromNTDSAPI))
if obj.DSPercentSearchesfromSAM != None:
print("DSPercentSearchesfromSAM:" + str(obj.DSPercentSearchesfromSAM))
if obj.DSPercentSearchesOther != None:
print("DSPercentSearchesOther:" + str(obj.DSPercentSearchesOther))
if obj.DSPercentWritesfromDRA != None:
print("DSPercentWritesfromDRA:" + str(obj.DSPercentWritesfromDRA))
if obj.DSPercentWritesfromKCC != None:
print("DSPercentWritesfromKCC:" + str(obj.DSPercentWritesfromKCC))
if obj.DSPercentWritesfromLDAP != None:
print("DSPercentWritesfromLDAP:" + str(obj.DSPercentWritesfromLDAP))
if obj.DSPercentWritesfromLSA != None:
print("DSPercentWritesfromLSA:" + str(obj.DSPercentWritesfromLSA))
if obj.DSPercentWritesfromNSPI != None:
print("DSPercentWritesfromNSPI:" + str(obj.DSPercentWritesfromNSPI))
if obj.DSPercentWritesfromNTDSAPI != None:
print("DSPercentWritesfromNTDSAPI:" + str(obj.DSPercentWritesfromNTDSAPI))
if obj.DSPercentWritesfromSAM != None:
print("DSPercentWritesfromSAM:" + str(obj.DSPercentWritesfromSAM))
if obj.DSPercentWritesOther != None:
print("DSPercentWritesOther:" + str(obj.DSPercentWritesOther))
if obj.DSSearchsuboperationsPersec != None:
print("DSSearchsuboperationsPersec:" + str(obj.DSSearchsuboperationsPersec))
if obj.DSSecurityDescriptorPropagationsEvents != None:
print("DSSecurityDescriptorPropagationsEvents:" + str(obj.DSSecurityDescriptorPropagationsEvents))
if obj.DSSecurityDescriptorPropagatorAverageExclusionTime != None:
print("DSSecurityDescriptorPropagatorAverageExclusionTime:" + str(obj.DSSecurityDescriptorPropagatorAverageExclusionTime))
if obj.DSSecurityDescriptorPropagatorRuntimeQueue != None:
print("DSSecurityDescriptorPropagatorRuntimeQueue:" + str(obj.DSSecurityDescriptorPropagatorRuntimeQueue))
if obj.DSSecurityDescriptorsuboperationsPersec != None:
print("DSSecurityDescriptorsuboperationsPersec:" + str(obj.DSSecurityDescriptorsuboperationsPersec))
if obj.DSServerBindsPersec != None:
print("DSServerBindsPersec:" + str(obj.DSServerBindsPersec))
if obj.DSServerNameTranslationsPersec != None:
print("DSServerNameTranslationsPersec:" + str(obj.DSServerNameTranslationsPersec))
if obj.DSThreadsinUse != None:
print("DSThreadsinUse:" + str(obj.DSThreadsinUse))
if obj.ExternalBindsPersec != None:
print("ExternalBindsPersec:" + str(obj.ExternalBindsPersec))
if obj.FastBindsPersec != None:
print("FastBindsPersec:" + str(obj.FastBindsPersec))
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.LDAPActiveThreads != None:
print("LDAPActiveThreads:" + str(obj.LDAPActiveThreads))
if obj.LDAPBindTime != None:
print("LDAPBindTime:" + str(obj.LDAPBindTime))
if obj.LDAPClientSessions != None:
print("LDAPClientSessions:" + str(obj.LDAPClientSessions))
if obj.LDAPClosedConnectionsPersec != None:
print("LDAPClosedConnectionsPersec:" + str(obj.LDAPClosedConnectionsPersec))
if obj.LDAPNewConnectionsPersec != None:
print("LDAPNewConnectionsPersec:" + str(obj.LDAPNewConnectionsPersec))
if obj.LDAPNewSSLConnectionsPersec != None:
print("LDAPNewSSLConnectionsPersec:" + str(obj.LDAPNewSSLConnectionsPersec))
if obj.LDAPSearchesPersec != None:
print("LDAPSearchesPersec:" + str(obj.LDAPSearchesPersec))
if obj.LDAPSuccessfulBindsPersec != None:
print("LDAPSuccessfulBindsPersec:" + str(obj.LDAPSuccessfulBindsPersec))
if obj.LDAPUDPoperationsPersec != None:
print("LDAPUDPoperationsPersec:" + str(obj.LDAPUDPoperationsPersec))
if obj.LDAPWritesPersec != None:
print("LDAPWritesPersec:" + str(obj.LDAPWritesPersec))
if obj.LinkValuesCleanedPersec != None:
print("LinkValuesCleanedPersec:" + str(obj.LinkValuesCleanedPersec))
if obj.Name != None:
print("Name:" + str(obj.Name))
if obj.NegotiatedBindsPersec != None:
print("NegotiatedBindsPersec:" + str(obj.NegotiatedBindsPersec))
if obj.NTLMBindsPersec != None:
print("NTLMBindsPersec:" + str(obj.NTLMBindsPersec))
if obj.OnelevelsearchesPersec != None:
print("OnelevelsearchesPersec:" + str(obj.OnelevelsearchesPersec))
if obj.PhantomsCleanedPersec != None:
print("PhantomsCleanedPersec:" + str(obj.PhantomsCleanedPersec))
if obj.PhantomsVisitedPersec != None:
print("PhantomsVisitedPersec:" + str(obj.PhantomsVisitedPersec))
if obj.SAMAccountGroupEvaluationLatency != None:
print("SAMAccountGroupEvaluationLatency:" + str(obj.SAMAccountGroupEvaluationLatency))
if obj.SAMDisplayInformationQueriesPersec != None:
print("SAMDisplayInformationQueriesPersec:" + str(obj.SAMDisplayInformationQueriesPersec))
if obj.SAMDomainLocalGroupMembershipEvaluationsPersec != None:
print("SAMDomainLocalGroupMembershipEvaluationsPersec:" + str(obj.SAMDomainLocalGroupMembershipEvaluationsPersec))
if obj.SAMEnumerationsPersec != None:
print("SAMEnumerationsPersec:" + str(obj.SAMEnumerationsPersec))
if obj.SAMGCEvaluationsPersec != None:
print("SAMGCEvaluationsPersec:" + str(obj.SAMGCEvaluationsPersec))
if obj.SAMGlobalGroupMembershipEvaluationsPersec != None:
print("SAMGlobalGroupMembershipEvaluationsPersec:" + str(obj.SAMGlobalGroupMembershipEvaluationsPersec))
if obj.SAMMachineCreationAttemptsPersec != None:
print("SAMMachineCreationAttemptsPersec:" + str(obj.SAMMachineCreationAttemptsPersec))
if obj.SAMMembershipChangesPersec != None:
print("SAMMembershipChangesPersec:" + str(obj.SAMMembershipChangesPersec))
if obj.SAMNonTransitiveMembershipEvaluationsPersec != None:
print("SAMNonTransitiveMembershipEvaluationsPersec:" + str(obj.SAMNonTransitiveMembershipEvaluationsPersec))
if obj.SAMPasswordChangesPersec != None:
print("SAMPasswordChangesPersec:" + str(obj.SAMPasswordChangesPersec))
if obj.SAMResourceGroupEvaluationLatency != None:
print("SAMResourceGroupEvaluationLatency:" + str(obj.SAMResourceGroupEvaluationLatency))
if obj.SAMSuccessfulComputerCreationsPersecIncludesallrequests != None:
print("SAMSuccessfulComputerCreationsPersecIncludesallrequests:" + str(obj.SAMSuccessfulComputerCreationsPersecIncludesallrequests))
if obj.SAMSuccessfulUserCreationsPersec != None:
print("SAMSuccessfulUserCreationsPersec:" + str(obj.SAMSuccessfulUserCreationsPersec))
if obj.SAMTransitiveMembershipEvaluationsPersec != None:
print("SAMTransitiveMembershipEvaluationsPersec:" + str(obj.SAMTransitiveMembershipEvaluationsPersec))
if obj.SAMUniversalGroupMembershipEvaluationsPersec != None:
print("SAMUniversalGroupMembershipEvaluationsPersec:" + str(obj.SAMUniversalGroupMembershipEvaluationsPersec))
if obj.SAMUserCreationAttemptsPersec != None:
print("SAMUserCreationAttemptsPersec:" + str(obj.SAMUserCreationAttemptsPersec))
if obj.SimpleBindsPersec != None:
print("SimpleBindsPersec:" + str(obj.SimpleBindsPersec))
if obj.SubtreesearchesPersec != None:
print("SubtreesearchesPersec:" + str(obj.SubtreesearchesPersec))
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.TombstonesGarbageCollectedPersec != None:
print("TombstonesGarbageCollectedPersec:" + str(obj.TombstonesGarbageCollectedPersec))
if obj.TombstonesVisitedPersec != None:
print("TombstonesVisitedPersec:" + str(obj.TombstonesVisitedPersec))
print("")
print("########")
print("")
