Самый первый и очевидный способ получить информацию о работе Bind - это rndc:
Там добавляем в блок options:
Выглядит в итоге статистика примерно вот так:
rndc statusНо тут почти нету ничего интересного и важного, что же делать? Активировать расширенную статистику (здесь и далее все примеры для Debian):
version: 9.7.3 (BIND)
CPUs found: 16
worker threads: 16
number of zones: 149323
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
vim /etc/bind/named.conf.options
Там добавляем в блок options:
statistics-file "/var/run/named/named.stats";Применяем конфигурацию:
rndc reloadОсуществляем сброс статистики в файл:
rndc statsПросматриваем:
cat /var/run/named/named.stats
Выглядит в итоге статистика примерно вот так:
cat /var/run/named/named.stats
+++ Statistics Dump +++ (1352974226)
++ Incoming Requests ++
208759943 QUERY
8 IQUERY
11847 NOTIFY
51927 UPDATE
++ Incoming Queries ++
4 RESERVED0
167218906 A
1110579 NS
28274 CNAME
189483 SOA
391344 PTR
567 HINFO
9556451 MX
759870 TXT
33 RP
2 AFSDB
28448043 AAAA
91280 SRV
490 NAPTR
77647 A6
913 DS
257 SSHFP
55 RRSIG
3306 DNSKEY
257 NSEC3PARAM
278 TYPE52
178186 SPF
804 TKEY
1 IXFR
2284 AXFR
3 MAILB
700618 ANY
5 Others
++ Outgoing Queries ++
[View: default]
758 A
19 NS
870 AAAA
[View: _bind]
++ Name Server Statistics ++
208824909 IPv4 requests received
126888579 requests with EDNS(0) received
15310 TCP requests received
38665964 auth queries rejected
12280385 recursive queries rejected
2207 transfer requests rejected
51927 update requests rejected
208824904 responses sent
152 truncated responses sent
126888577 responses with EDNS(0) sent
119637521 queries resulted in successful answer
158234385 queries resulted in authoritative answer
69103 queries resulted in non authoritative answer
69103 queries resulted in referral answer
20418156 queries resulted in nxrrset
208315 queries resulted in SERVFAIL
18178708 queries resulted in NXDOMAIN
50245852 other query failures
++ Zone Maintenance Statistics ++
216262 IPv4 notifies sent
164 IPv6 notifies sent
6278 IPv4 notifies received
++ Resolver Statistics ++
[Common]
541 mismatch responses received
[View: default]
1450 IPv4 queries sent
197 IPv6 queries sent
1340 IPv4 responses received
100 NXDOMAIN received
30 SERVFAIL received
44 other errors received
25 EDNS(0) query failures
1 truncated responses received
7 lame delegations received
417 query retries
122 query timeouts
313 IPv4 NS address fetches
341 IPv6 NS address fetches
61 IPv4 NS address fetch failed
286 IPv6 NS address fetch failed
166 queries with RTT < 10ms
921 queries with RTT 10-100ms
243 queries with RTT 100-500ms
[View: _bind]
++ Cache DB RRsets ++
[View: default]
51 A
17 NS
1 CNAME
23 AAAA
2 DS
3 RRSIG
3 !AAAA
1 NXDOMAIN
[View: _bind (Cache: _bind)]
++ Socket I/O Statistics ++
11012 UDP/IPv4 sockets opened
292 UDP/IPv6 sockets opened
4 TCP/IPv4 sockets opened
1 TCP/IPv6 sockets opened
11009 UDP/IPv4 sockets closed
292 UDP/IPv6 sockets closed
19556 TCP/IPv4 sockets closed
197 UDP/IPv6 socket connect failures
1449 UDP/IPv4 connections established
1 TCP/IPv4 connections established
19556 TCP/IPv4 connections accepted
351 UDP/IPv6 send errors
1 TCP/IPv4 send errors
10 UDP/IPv4 recv errors
12 TCP/IPv4 recv errors
++ Per Zone Query Statistics ++
--- Statistics Dump --- (1352974226)
No comments:
Post a Comment
Note: only a member of this blog may post a comment.