Win32_PerfRawData_DNS vbscript 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_DNS WMI class can be used in ActiveXperts Network Monitor to monitor your servers.
Sample Code
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * From Win32_PerfRawData_DNS_DNS") For Each objItem in colItems WScript.Echo "AXFRRequestReceived:" & objItem.AXFRRequestReceived WScript.Echo "AXFRRequestSent:" & objItem.AXFRRequestSent WScript.Echo "AXFRResponseReceived:" & objItem.AXFRResponseReceived WScript.Echo "AXFRSuccessReceived:" & objItem.AXFRSuccessReceived WScript.Echo "AXFRSuccessSent:" & objItem.AXFRSuccessSent WScript.Echo "CachingMemory:" & objItem.CachingMemory WScript.Echo "Caption:" & objItem.Caption WScript.Echo "DatabaseNodeMemory:" & objItem.DatabaseNodeMemory WScript.Echo "Description:" & objItem.Description WScript.Echo "DynamicUpdateNoOperation:" & objItem.DynamicUpdateNoOperation WScript.Echo "DynamicUpdateNoOperationPersec:" & objItem.DynamicUpdateNoOperationPersec WScript.Echo "DynamicUpdateQueued:" & objItem.DynamicUpdateQueued WScript.Echo "DynamicUpdateReceived:" & objItem.DynamicUpdateReceived WScript.Echo "DynamicUpdateReceivedPersec:" & objItem.DynamicUpdateReceivedPersec WScript.Echo "DynamicUpdateRejected:" & objItem.DynamicUpdateRejected WScript.Echo "DynamicUpdateTimeOuts:" & objItem.DynamicUpdateTimeOuts WScript.Echo "DynamicUpdateWrittentoDatabase:" & objItem.DynamicUpdateWrittentoDatabase WScript.Echo "DynamicUpdateWrittentoDatabasePersec:" & objItem.DynamicUpdateWrittentoDatabasePersec WScript.Echo "Frequency_Object:" & objItem.Frequency_Object WScript.Echo "Frequency_PerfTime:" & objItem.Frequency_PerfTime WScript.Echo "Frequency_Sys100NS:" & objItem.Frequency_Sys100NS WScript.Echo "IXFRRequestReceived:" & objItem.IXFRRequestReceived WScript.Echo "IXFRRequestSent:" & objItem.IXFRRequestSent WScript.Echo "IXFRResponseReceived:" & objItem.IXFRResponseReceived WScript.Echo "IXFRSuccessReceived:" & objItem.IXFRSuccessReceived WScript.Echo "IXFRSuccessSent:" & objItem.IXFRSuccessSent WScript.Echo "IXFRTCPSuccessReceived:" & objItem.IXFRTCPSuccessReceived WScript.Echo "IXFRUDPSuccessReceived:" & objItem.IXFRUDPSuccessReceived WScript.Echo "Name:" & objItem.Name WScript.Echo "NbstatMemory:" & objItem.NbstatMemory WScript.Echo "NotifyReceived:" & objItem.NotifyReceived WScript.Echo "NotifySent:" & objItem.NotifySent WScript.Echo "RecordFlowMemory:" & objItem.RecordFlowMemory WScript.Echo "RecursiveQueries:" & objItem.RecursiveQueries WScript.Echo "RecursiveQueriesPersec:" & objItem.RecursiveQueriesPersec WScript.Echo "RecursiveQueryFailure:" & objItem.RecursiveQueryFailure WScript.Echo "RecursiveQueryFailurePersec:" & objItem.RecursiveQueryFailurePersec WScript.Echo "RecursiveSendTimeOuts:" & objItem.RecursiveSendTimeOuts WScript.Echo "RecursiveTimeOutPersec:" & objItem.RecursiveTimeOutPersec WScript.Echo "SecureUpdateFailure:" & objItem.SecureUpdateFailure WScript.Echo "SecureUpdateReceived:" & objItem.SecureUpdateReceived WScript.Echo "SecureUpdateReceivedPersec:" & objItem.SecureUpdateReceivedPersec WScript.Echo "TCPMessageMemory:" & objItem.TCPMessageMemory WScript.Echo "TCPQueryReceived:" & objItem.TCPQueryReceived WScript.Echo "TCPQueryReceivedPersec:" & objItem.TCPQueryReceivedPersec WScript.Echo "TCPResponseSent:" & objItem.TCPResponseSent WScript.Echo "TCPResponseSentPersec:" & objItem.TCPResponseSentPersec WScript.Echo "Timestamp_Object:" & objItem.Timestamp_Object WScript.Echo "Timestamp_PerfTime:" & objItem.Timestamp_PerfTime WScript.Echo "Timestamp_Sys100NS:" & objItem.Timestamp_Sys100NS WScript.Echo "TotalQueryReceived:" & objItem.TotalQueryReceived WScript.Echo "TotalQueryReceivedPersec:" & objItem.TotalQueryReceivedPersec WScript.Echo "TotalResponseSent:" & objItem.TotalResponseSent WScript.Echo "TotalResponseSentPersec:" & objItem.TotalResponseSentPersec WScript.Echo "UDPMessageMemory:" & objItem.UDPMessageMemory WScript.Echo "UDPQueryReceived:" & objItem.UDPQueryReceived WScript.Echo "UDPQueryReceivedPersec:" & objItem.UDPQueryReceivedPersec WScript.Echo "UDPResponseSent:" & objItem.UDPResponseSent WScript.Echo "UDPResponseSentPersec:" & objItem.UDPResponseSentPersec WScript.Echo "UnmatchedResponsesReceived:" & objItem.UnmatchedResponsesReceived WScript.Echo "WINSLookupReceived:" & objItem.WINSLookupReceived WScript.Echo "WINSLookupReceivedPersec:" & objItem.WINSLookupReceivedPersec WScript.Echo "WINSResponseSent:" & objItem.WINSResponseSent WScript.Echo "WINSResponseSentPersec:" & objItem.WINSResponseSentPersec WScript.Echo "WINSReverseLookupReceived:" & objItem.WINSReverseLookupReceived WScript.Echo "WINSReverseLookupReceivedPersec:" & objItem.WINSReverseLookupReceivedPersec WScript.Echo "WINSReverseResponseSent:" & objItem.WINSReverseResponseSent WScript.Echo "WINSReverseResponseSentPersec:" & objItem.WINSReverseResponseSentPersec WScript.Echo "ZoneTransferFailure:" & objItem.ZoneTransferFailure WScript.Echo "ZoneTransferRequestReceived:" & objItem.ZoneTransferRequestReceived WScript.Echo "ZoneTransferSOARequestSent:" & objItem.ZoneTransferSOARequestSent WScript.Echo "ZoneTransferSuccess:" & objItem.ZoneTransferSuccess WScript.Echo "" WScript.Echo "########" WScript.Echo "" Next