Is it normal for dscacheutil to return an (almost) empty cache? I tried the same -cachedump command on 10.5.8 and I got a list of internal and external hosts as I'd expected to have seen.
The 1.5~ million cache misses for gethostbyname was after firing up a FileMaker database that opens in sub 30s on 10.5.8 but takes over 5 minutes in 10.6.6.
dscacheutil -statistics
Overall Statistics:
Average Call Time - 0.001025
Cache Hits - 1533905
Cache Misses - 3063347
Total External Calls - 1539214
Statistics by procedure:
Procedure Cache Hits Cache Misses External Calls
------------------ ---------- ------------ --------------
getpwnam 542 129 671
getpwuid 6242 510 6752
getgrnam 106 175 281
getgrgid 6 32 38
getservbyname 1527001 661 63
getfsent 0 0 193
getnetbyaddr 0 35 35
gethostbyname 8 1530311 1950
gethostbyaddr 0 861 861
gethostbyname_service 0 0 1528369
sudo dscacheutil -cachedump -entries
DirectoryService Cache Overview:
AAAA Queries - Disabled (link-local IPv6 addresses)
Cache Size - 8
Entry count by category:
Group - 3
Service - 1
User - 4
Cache entries (ordered as stored in the cache):
Category Best Before Last Access Hits Refs TTL Neg DS Node
---------- ------------------ ------------------ -------- ------ -------- ----- ---------
User 01/26/11 11:08:31 01/26/11 10:45:38 124 1 3600 /Local/Default
Key: pw_name:dale
Key: pw_uid:502
Group 01/26/11 11:09:28 01/26/11 10:09:28 0 1 3600 /Local/Default
Key: gr_uuid:ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000009
Key: gr_gid:9
Key: gr_name:procmod
Group 01/26/11 11:09:28 01/26/11 10:09:28 0 1 3600 /Local/Default
Key: gr_name:procview
Key: gr_uuid:ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000008
Key: gr_gid:8
Service 01/26/11 11:09:45 01/26/11 10:44:38 1 1 3600 /BSD/local
Key: s_name:ipp
Key: s_name:ipp s_proto:udp
Key: s_port:631 s_proto:udp
User 01/26/11 11:09:46 01/26/11 10:43:34 21 1 3600 /Local/Default
Key: pw_name:spotlight
Key: pw_name:_spotlight
Key: pw_uid:89
Group 01/26/11 11:43:53 01/26/11 10:43:53 0 1 3600 /Local/Default
Key: gr_name:tty
Key: gr_gid:4
Key: gr_uuid:ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000004
User 01/26/11 11:44:38 01/26/11 10:44:38 0 1 3600 /Local/Default
Key: pw_name:root
Key: pw_uid:0
User 01/26/11 11:44:38 01/26/11 10:44:39 1 1 3600 /Local/Default
Key: pw_gecos:Unprivileged User
Key: pw_name:nobody
Key: pw_uid:-2