아래와 같이 pkill 을 사용하여 USR1시그널을dnsmasq로전달하면 통계정보를 dump 할수 있다
pkill -USR1 dnsmasq
/var/log/dnsmasq.log 에서 확인 가능
Jan 16 13:10:24 dnsmasq[24931]: time 1673842224
Jan 16 13:10:24 dnsmasq[24931]: cache size 500, 0/0 cache insertions re-used unexpired cache entries. (캐쉬 사이즈)
Jan 16 13:10:24 dnsmasq[24931]: queries forwarded 0, queries answered locally 4 (로컬에서 등답 횟수)
Jan 16 13:10:24 dnsmasq[24931]: queries for authoritative zones 0
Jan 16 13:10:24 dnsmasq[24931]: server 1.1.1.1 #53: queries sent 0, retried or failed 0 (전역 DNS 전달 회수 및 실패횟수)
추가로 dig 를 사용하여 정보를 확인 가능
## DNS Cache Statistics ##
==============================================
# DNS cache insertions
dig +short chaos txt insertions.bind
# unexpired cache entry
dig +short chaos txt evictions.bind
# cache size
dig +short chaos txt cachesize.bind
# queries forwarded (
dig +short chaos txt misses.bind
# queries answered locally (로컬응답)
dig +short chaos txt hits.bind
위 통계 정보는 dnsmasq 재기동시 모두 초기화 된다.
'OS > CentOS' 카테고리의 다른 글
| ## Goaccess 설치 (0) | 2023.10.20 |
|---|---|
| SSL 체크 스크립트 (0) | 2023.05.11 |
| dnsmasq를 사용하여 DNS 서버 설정하기 (DNS cache) (0) | 2023.01.13 |
| openssl 버전업 (CentOS 7.x에서 openssl 버전업) (0) | 2022.02.22 |
| [CentOS 6/7/8] EPEL 과 Remi Repo 설치 하기 (0) | 2021.11.23 |