domain-name-system – 通过WHM或SSH查找每月DNS查询的数量?

前端之家收集整理的这篇文章主要介绍了domain-name-system – 通过WHM或SSH查找每月DNS查询的数量?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
可能吗?我们完全控制了我们的DNS服务器和实际指向的服务器.我们感兴趣的是我们目前获得了多少DNS查询,因为我们想要迁移到Ultra DNS,但我们需要知道一个月内我们可能会收到多少查询.

这有可能搞清楚吗?在跟踪开始之前我是否需要启动服务?或者使用shell来访问数据?

解决方法

正如AndyN所说,这里的答案是:
sudo rndc stats

当您运行此命令时(如果在named.conf文件中配置),Bind会将统计信息转储到已配置的统计信息文件中.

您需要检查以下行的/etc/bind/named.conf.*文件

[ statistics-file "path_name"; ]

(在Ubuntu上它是named.conf.options,路径是/var/run/named/named.stats)

从您的问题看来,您需要知道大约数量的DNS查询以进行扩展.您应该能够从文件中大致了解这一点.


sudo rndc stats

然后经过一段合适的时间(几个小时?几天?)再次运行.

在您的统计文件中,您将看到以下内容(这来自我自己的家庭DNS服务器 – 它既是缓存解析器又是权威的).

为大量信息道歉…第一行中的数字是“大纪元时间”(自1970-1-1 00:00 UTC以来的秒数).使用此功能,您可以计算出从一个“rndc stats”到下一个“rndc stats”的时间差异以及不同数量的请求(您将要查看Incoming“QUERY”和传出总计(A NS SOA PTR TXT AAAA) .

+++ Statistics Dump +++ (1275999954)
++ Incoming Requests ++
                432 QUERY
++ Incoming Queries ++
                 306 A
                   2 NS
                   4 SOA
                  45 PTR
                   5 TXT
                  70 AAAA
++ Outgoing Queries ++
[View: default]
                 523 A
                   4 NS
                   4 SOA
                  42 PTR
                   9 TXT
                 330 AAAA
[View: _bind]
++ Name Server Statistics ++
                 432 IPv4 requests received
                 431 responses sent
                 259 queries resulted in successful answer
                  96 queries resulted in authoritative answer
                 335 queries resulted in non authoritative answer
                  39 queries resulted in nxrrset
                 133 queries resulted in NXDOMAIN
                 238 queries caused recursion
                   1 duplicate queries received
++ Zone Maintenance Statistics ++
++ Resolver Statistics ++
[Common]
[View: default]
                 849 IPv4 queries sent
                  63 IPv6 queries sent
                 841 IPv4 responses received
                  67 NXDOMAIN received
                   2 FORMERR received
                   2 EDNS(0) query failures
                 123 query retries
                   5 query timeouts
                 118 IPv4 NS address fetches
                 118 IPv6 NS address fetches
                   1 IPv4 NS address fetch Failed
                  90 IPv6 NS address fetch Failed
                  13 queries with RTT < 10ms
                 549 queries with RTT 10-100ms
                 279 queries with RTT 100-500ms
[View: _bind]
++ Cache DB RRsets ++
[View: default]
                 366 A
                  87 NS
                   9 CNAME
                   1 PTR
                  97 AAAA
                  20 RRSIG
                  15 NSEC
                   4 !AAAA
                   1 NXDOMAIN
[View: _bind]
++ Socket I/O Statistics ++
                 852 UDP/IPv4 sockets opened
                  64 UDP/IPv6 sockets opened
                   3 TCP/IPv4 sockets opened
                   2 TCP/IPv6 sockets opened
                 850 UDP/IPv4 sockets closed
                  63 UDP/IPv6 sockets closed
                 123 TCP/IPv4 sockets closed
                   1 UDP/IPv4 socket bind failures
                  63 UDP/IPv6 socket connect failures
                 849 UDP/IPv4 connections established
                 124 TCP/IPv4 connections accepted
                  63 UDP/IPv6 send errors
                   3 UDP/IPv4 recv errors
++ Per Zone Query Statistics ++
--- Statistics Dump --- (1275999954)
原文链接:https://www.f2er.com/html/229397.html

猜你在找的HTML相关文章