Dumping named's cache

Jim Reid jim at mpn.cp.philips.com
Wed Aug 11 16:52:25 UTC 1999


>>>>> "Robert" == Robert T Clift <rclift at nswc.navy.mil> writes:

    Robert> Short of restarting named, is there a way to manually
    Robert> dump/clean the cache.

No. However someone in this list claims to have a patch which does
this and is going submit it to the ISC. Perhaps this might be in a
future BIND release? NB: the cleaning-interval in BIND8 just
determines how often named does garbage collection on its cache. It
just gets rid of any memory assigned to RRs that have expired since
the previous cleanup interval. This has no impact on the contents of
the cache. Once an RR has expired, it is ignored even if it's still in
memory awaiting disposal at the next cache cleaning interval.

    Robert> I used "kill -INT pid" and this of course lets me see what
    Robert> is in the current cache but is it actually reloading or
    Robert> building a new cache?

Er, that should be "ndc dumpdb", not "kill". All that does is get the
name server to write its cache and some other internal data structures
to a file. It's a write-only operation. It does nothing to the cache.
First of all, there's nothing to reload: the name server loads zone
files, not its cache which isn't represented in a zone file anyway.
The cache isn't maintained anywhere except in named's VM. However you
can think of the file produced by "ndc dumpdb" as a human-readable
snapshot of that cache which happens to be in RFC1035's zone file
format. Secondly there's no new cache to build. The cache already
exists and is populated with the data your name server has picked up
as a side effect of processing the lookup requests it's been given.


More information about the bind-users mailing list