PDA

View Full Version : Display DNS Cache?


sailships
03-20-2006, 01:52 PM
I know how to clear the DNS cache, but...

Is there a way in Mac OSX to have the DNS cache *displayed*, as there is in Windows? (ipconfig /displaydns)

Thanks!

hayne
03-20-2006, 02:48 PM
You likely can do this via the 'lookupd' command - read 'man lookupd'

sailships
03-20-2006, 03:35 PM
Hi hayne,

I have the whole BSD System Manager's Manual lookupd and have read it.

I find subtitles that I think may apply to me, however, either it doesnt include the actual command, or I am missing it as a result of being new to MAC's.
Hence, my request to someone with more experience than I.

Some of the sections I have found, but that I feel dont include my answers are:
CacheAgent
The operation and configuration of the cache agent are described in detail in the sections above. The configuration options for the Cache agent are ValidateCache, CacheCapacity, and TimeToLive. These options may be set globally and/or for specific categories.
Options set for a specific category will over-ride the global setting.

Note that CacheAgent should always appear first in a LookupOrder specification to allow lookupd to find cached entries before searching other information services.

CacheAgent does not support a startup argument (as described at the beginning of this section).

DNSAgent
DNSAgent is the DNS client. Cached DNS entries are validated simply by the time-to-live associated with the DNS records. DNSAgent is only used for host name/address and network name/address resolution.

The Mac OS X DNS library used by the DNS agent allows the system to have a number of separate DNS clients. Each DNS client has the address of one or more DNS servers (which the client regards as being equivalent). Please refer to the resolver(5) man page for details on the Mac OS X DNS resolver.

hayne
03-20-2006, 04:15 PM
Sorry - I don't know the answer. I just assumed that if it is possible to display the DNS cache, it probably is done via 'lookupd' somehow.
You might have better luck asking your question on one of the Darwin mailing lists. Or maybe on the Mac administrators mailing list that is run by www.omnigroup.com

sailships
03-20-2006, 04:23 PM
I assumed the same... but I haven't found it.

I certainly appreciate the help and suggestions though! Thank you!

qwertme
01-13-2009, 08:54 AM
Type the following in the Terminal:

dscacheutil -cachedump -entries

sailships
01-13-2009, 10:19 AM
Thank you very much!

tlarkin
01-13-2009, 10:25 AM
Type the following in the Terminal:

dscacheutil -cachedump -entries

Yup was just going to recommend that.


$ dscacheutil
Usage: dscacheutil -h
dscacheutil -q category [-a key value]
dscacheutil -cachedump [-buckets] [-entries [category]]
dscacheutil -configuration
dscacheutil -flushcache
dscacheutil -statistics