15.7. Viewing DNS Server Performance Statistics

Problem

You want to view DNS Server performance statistics.

Solution

Using a graphical user interface

  1. Open the Performance Monitor.

  2. Click on System Monitor in the left pane.

  3. In the right pane, click the + button. This will bring up the page to add counters.

  4. Under Select counters from computer, enter the DNS server you want to target.

  5. Select the DNS performance object.

  6. Select the counters you want to add and click the Add button.

  7. Click Close.

Using a command-line interface

> dnscmd <DNSServerName> /statistics

Using VBScript

' This code displays all statistics for the specified DNS server
' ------ SCRIPT CONFIGURATION ------
strServer = "<DNSServerName>"   ' e.g. dc1.rallencorp.com
' ------ END CONFIGURATION ---------

set objDNS = GetObject("winmgmts:\\" & strServer & "\root\MicrosoftDNS")
set objDNSServer = objDNS.Get("MicrosoftDNS_Server.Name="".""")
set objStats = objDNS.ExecQuery("Select * from MicrosoftDNS_Statistic ")
for each objStat in objStats
   WScript.Echo " " & objStat.Name & " : " & objStat.Value
next

Discussion

The Microsoft DNS Server keeps track of dozens of performance metrics. These metrics include the number of queries, updates, transfers, directory reads, and directory writes processed by the server. If you can pump these metrics into an enterprise management system, you can track DNS usage and growth over time.

These statistics can also be useful to troubleshoot load-related issues. If you suspect a DNS Server is being overwhelmed with ...

Get Active Directory Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.