O'Reilly logo

Active Directory Cookbook by Robbie Allen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required