flushing dns cache

Sam Trenholme strenholme.usenet at gmail.com
Mon Oct 26 12:01:54 EDT 2009


> my question is; how does one flush the dns cache?

OK, I should make a FAQ about this.

If by "flush the cache" you mean "write the contents of the cache to
disk", the way to do it is as follows:

In Windows, with both the 2.3 and 2.4 branches of Deadwood:

net stop Deadwood
net start Deadwood

In CentOS 5, using Duende to start Deadwood 2.3 [1]:

kill -HUP $( ps auxw | grep DwMain | grep -v grep | awk '{print $2}' )

In CentOS 5, starting Deadwood 2.3 another way:

kill -USR1 $( ps auxw | grep DwMain | grep -v grep | awk '{print $2}' )

In CentOS 5, using Duende to start Deadwood 2.4:

kill -HUP $( ps auxw | grep Deadwood | grep -v grep | awk '{print $2}' )

In CentOS 5, starting Deadwood 2.4 another way:

kill -USR1 $( ps auxw | grep Deadwood | grep -v grep | awk '{print $2}' )

If you wish to remove the cache altogether, you will need to erase the
cache file before restarting Deadwood.  This is done in Windows by
entering the directory where Deadwood is installed and doing the
following:

net stop Deadwood
del dw_cache_bin
net start Deadwood

(This assumes the location of the cache file has not been altered;
make sure cache_file points to this file, which it should if you
haven't changed in the dwood2rc.txt file)

To erase the cache in CentOS 5, stop the Deadwood (DwMain in Deadwood
2.3) process, remove the file /etc/deadwood/dw_cache (this may be in a
different location or have a different filename, depending on how
chroot_dir and cache_file are set), and restart Deadwood.

- Sam

[1] Yes, I know about killall, and no, I don't use it because killall
reboots the system in Solaris.

Note: I do not answer MaraDNS support requests sent by private email
without being compensated for my time. A MaraDNS support request is
any and all discussion you may wish to have about MaraDNS in private
email; if you want to email me to talk about MaraDNS then, yes, that
is a support request. I will discuss rates if you want this kind of
support. Thank you for your understanding.

MaraDNS security vulnerability reports, however, will be dealt with
without charge and kept confidential. If you don't know what Bugtraq
is, then, no, your email is not a security report.


More information about the list mailing list