15.7.1 ProblemYou want to view DNS Server performance statistics. 15.7.2 Solution15.7.2.1 Using a graphical user interface
15.7.2.2 Using a command-line interface> dnscmd <DNSServerName> /statistics 15.7.2.3 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 15.7.3 DiscussionThe 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 DNS update requests, you can look at the Dynamic Update Received/sec counter and see if it is processing an unusually high number of updates. 15.7.3.1 Using a command-line interfaceYou can obtain a subset of the statistics by providing a "statid" after the /statistics option. Each statistics category has an associated number (i.e., statid). For a complete list of categories and their statid, run the following command: > dnscmd /statistics /? Here is an example of viewing the Query (statid = 2) and Query2 (statid = 4) statistics: > dnscmd /statistics 6 DNS Server . statistics: Queries and Responses: ---------------------- Total: Queries Received = 14902 Responses Sent = 12900 UDP: Queries Recvd = 14718 Responses Sent = 12716 Queries Sent = 23762 Responses Recvd = 0 TCP: Client Connects = 184 Queries Recvd = 184 Responses Sent = 184 Queries Sent = 0 Responses Recvd = 0 Queries: -------- Total = 14902 Notify = 0 Update = 2207 TKeyNego = 184 Standard = 12511 A = 1286 NS = 29 SOA = 2263 MX = 0 PTR = 1 SRV = 8909 ALL = 0 IXFR = 0 AXFR = 0 OTHER = 23 Command completed successfully. 15.7.3.2 Using VBScriptYou can obtain a subset of statistics by adding a where clause to the WQL query. The following query would match only counters that start with "Records": select * from MicrosoftDNS_Statistic where Name like 'Records%' 15.7.4 See AlsoMSDN: MicrosoftDNS_Statistic |