[dnsdist] How to list all entries in cache?

jiang-wd at 139.com jiang-wd at 139.com
Fri Aug 30 01:22:40 UTC 2024


Hi,

I've tested PacketCache:dump, but can not find response infomation.
Can you give me any advice? Thanks.

# dnsdist -c
> getPool(""):getCache():dump("/tmp/cache.txt")
Dumped 15 records

# find /tmp -name cache.txt | xargs -i cat {}
; dnsdist's packet cache dump follows
;
api.td-tech.com. 573 A ; rcode 0, key 2881828960, length 49, received over UDP 1, added 1724980612
hss-agent.cn-south-1.myhuaweicloud.com. 142 A ; rcode 0, key 129687561, length 72, received over UDP 1, added 1724980495
wpad.TD-TECH.net. 1133 A ; rcode 3, key 1609248641, length 99, received over UDP 1, added 1724978172
support-tb.td-tech.com. 2734 A ; rcode 0, key 3716646902, length 56, received over UDP 1, added 1724979773
mail.td-tech.com. -19 A ; rcode 0, key 962522048, length 66, received over UDP 1, added 1724980560
styxcl.b.qianxin.com. 16 A ; rcode 0, key 4144263609, length 88, received over UDP 1, added 1724980595
sap-router.td-tech.net. 2982 A ; rcode 0, key 899245109, length 56, received over UDP 1, added 1724980021
optimizationguide-pa.googleapis.com. 71 A ; rcode 0, key 4284496170, length 309, received over UDP 1, added 1724980575
mes.td-tech.com. 3281 A ; rcode 0, key 4262139630, length 49, received over UDP 1, added 1724980320
ces.cn-south-1.myhuaweicloud.com. 142 A ; rcode 0, key 2552404253, length 66, received over UDP 1, added 1724980542
SMPRD01.td-tech.net. 746 A ; rcode 0, key 3793644333, length 53, received over UDP 1, added 1724980185
agent.ces.myhuaweicloud.com. 142 A ; rcode 0, key 2454567753, length 101, received over UDP 1, added 1724980492
agent.ces.myhuaweicloud.com. 142 A ; rcode 0, key 2433749734, length 90, received over UDP 1, added 1724980501
251.1.125.100.in-addr.arpa. 1025 PTR ; rcode 3, key 2369125478, length 99, received over UDP 1, added 1724979952
optimizationguide-pa.googleapis.com. 6 HTTPS ; rcode 0, key 723875979, length 110, received over UDP 1, added 1724980621

 


 
From: Remi Gacogne via dnsdist
Date: 2024-08-26 15:26
To: dnsdist
Subject: Re: [dnsdist] How to list all entries in cache?
Hi
 
On 25/08/2024 06:31, jiangwendong via dnsdist wrote:
> How to list all entries in cache?
> I can not foud a usable command in documentation
 
You can use the dump() [1] method on a PacketCache object to dump a 
summary of the cache content to a file.
 
[1]: https://dnsdist.org/reference/config.html#PacketCache:dump
 
Best regards,
-- 
Remi Gacogne
PowerDNS.COM BV - https://www.powerdns.com/
 
 
 
_______________________________________________
dnsdist mailing list
dnsdist at mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/dnsdist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/dnsdist/attachments/20240830/d5141e36/attachment.htm>


More information about the dnsdist mailing list