dnsmasq的缓存内容在哪里

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
zszzd
帖子: 156
注册时间: 2007-12-12 22:54

dnsmasq的缓存内容在哪里

#1

帖子 zszzd » 2008-05-09 13:06

我的DNS很慢,装了dnsmasq后快得太多了,很好!!
但我不知道它的缓存的内容放哪了,我试了下,重启后缓存仍然有效,应该有缓存IP和域名的对照文件。请老鸟指点。
XDG3669
帖子: 380
注册时间: 2006-07-10 22:50

#2

帖子 XDG3669 » 2008-05-09 13:25

我还想知道呢!
头像
zszzd
帖子: 156
注册时间: 2007-12-12 22:54

#3

帖子 zszzd » 2008-05-26 14:07

我再顶一下,强人快来
头像
greco
帖子: 2487
注册时间: 2007-04-06 10:24
来自: ~/Shanghai

#4

帖子 greco » 2008-05-26 14:12

鄙视你一顶再顶~~~~

应该在 /etc/resolv.conf 文件中
http://silenceisdefeat.com/~greco

代码: 全选

''.join([chr(ord(c)-2) for c in 'O{"G/ockn"ku<"itgeq0ujkBiockn0eqo'])
echo -n "Z3JlY28uc2hpQGdtYWlsLmNvbQ==" | base64 -d
头像
zszzd
帖子: 156
注册时间: 2007-12-12 22:54

#5

帖子 zszzd » 2008-05-28 18:28

greco 写了:鄙视你一顶再顶~~~~

应该在 /etc/resolv.conf 文件中

这里是DNS的设置,不是dnsmasq的缓存文件啊。。。

无知者无畏,变向再顶一回。
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#6

帖子 BigSnake.NET » 2008-05-28 18:38

代码: 全选

root@autumncat-host:/proc
# pgrep dns
4451 dnsmasq
Exit status: 0
root@autumncat-host:/proc
# cd 4451
Exit status: 0
root@autumncat-host:/proc/4451
# cd fd
Exit status: 0
root@autumncat-host:/proc/4451/fd
# ll
总用量 0
lrwx------ 1 root root 64 2008-05-28 11:52 0 -> /dev/null
lrwx------ 1 root root 64 2008-05-28 11:52 1 -> /dev/null
lrwx------ 1 root root 64 2008-05-28 11:52 10 -> socket:[12038]
lrwx------ 1 root root 64 2008-05-28 11:52 11 -> socket:[12041]
lrwx------ 1 root root 64 2008-05-28 11:52 2 -> /dev/null
lrwx------ 1 root root 64 2008-05-28 11:52 3 -> socket:[12025]
lrwx------ 1 root root 64 2008-05-28 11:52 4 -> socket:[12030]
lrwx------ 1 root root 64 2008-05-28 11:52 5 -> socket:[12031]
lrwx------ 1 root root 64 2008-05-28 11:52 6 -> socket:[12032]
lrwx------ 1 root root 64 2008-05-28 11:52 7 -> socket:[12033]
lr-x------ 1 root root 64 2008-05-28 11:52 8 -> pipe:[12034]
l-wx------ 1 root root 64 2008-05-28 11:52 9 -> pipe:[12034]
Exit status: 0
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
头像
zszzd
帖子: 156
注册时间: 2007-12-12 22:54

#7

帖子 zszzd » 2008-05-28 18:54

BigSnake.NET 写了:

代码: 全选

root@autumncat-host:/proc
# pgrep dns
4451 dnsmasq
Exit status: 0
root@autumncat-host:/proc
# cd 4451
Exit status: 0
root@autumncat-host:/proc/4451
# cd fd
Exit status: 0
root@autumncat-host:/proc/4451/fd
# ll
总用量 0
lrwx------ 1 root root 64 2008-05-28 11:52 0 -> /dev/null
lrwx------ 1 root root 64 2008-05-28 11:52 1 -> /dev/null
lrwx------ 1 root root 64 2008-05-28 11:52 10 -> socket:[12038]
lrwx------ 1 root root 64 2008-05-28 11:52 11 -> socket:[12041]
lrwx------ 1 root root 64 2008-05-28 11:52 2 -> /dev/null
lrwx------ 1 root root 64 2008-05-28 11:52 3 -> socket:[12025]
lrwx------ 1 root root 64 2008-05-28 11:52 4 -> socket:[12030]
lrwx------ 1 root root 64 2008-05-28 11:52 5 -> socket:[12031]
lrwx------ 1 root root 64 2008-05-28 11:52 6 -> socket:[12032]
lrwx------ 1 root root 64 2008-05-28 11:52 7 -> socket:[12033]
lr-x------ 1 root root 64 2008-05-28 11:52 8 -> pipe:[12034]
l-wx------ 1 root root 64 2008-05-28 11:52 9 -> pipe:[12034]
Exit status: 0

什么意思?是内存里的吗?硬盘上应该有缓存文件吧。。。。在吗?
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#8

帖子 BigSnake.NET » 2008-05-28 18:55

zszzd 写了:
BigSnake.NET 写了:

代码: 全选

root@autumncat-host:/proc
# pgrep dns
4451 dnsmasq
Exit status: 0
root@autumncat-host:/proc
# cd 4451
Exit status: 0
root@autumncat-host:/proc/4451
# cd fd
Exit status: 0
root@autumncat-host:/proc/4451/fd
# ll
总用量 0
lrwx------ 1 root root 64 2008-05-28 11:52 0 -> /dev/null
lrwx------ 1 root root 64 2008-05-28 11:52 1 -> /dev/null
lrwx------ 1 root root 64 2008-05-28 11:52 10 -> socket:[12038]
lrwx------ 1 root root 64 2008-05-28 11:52 11 -> socket:[12041]
lrwx------ 1 root root 64 2008-05-28 11:52 2 -> /dev/null
lrwx------ 1 root root 64 2008-05-28 11:52 3 -> socket:[12025]
lrwx------ 1 root root 64 2008-05-28 11:52 4 -> socket:[12030]
lrwx------ 1 root root 64 2008-05-28 11:52 5 -> socket:[12031]
lrwx------ 1 root root 64 2008-05-28 11:52 6 -> socket:[12032]
lrwx------ 1 root root 64 2008-05-28 11:52 7 -> socket:[12033]
lr-x------ 1 root root 64 2008-05-28 11:52 8 -> pipe:[12034]
l-wx------ 1 root root 64 2008-05-28 11:52 9 -> pipe:[12034]
Exit status: 0

什么意思?是内存里的吗?硬盘上应该有缓存文件吧。。。。在吗?
没找到
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#9

帖子 BigSnake.NET » 2008-05-28 18:57

代码: 全选

$ sudo lsof -p 4451
COMMAND  PID    USER   FD   TYPE             DEVICE    SIZE  NODE NAME
dnsmasq 4451 dnsmasq  cwd    DIR                8,6     736     2 /
dnsmasq 4451 dnsmasq  rtd    DIR                8,6     736     2 /
dnsmasq 4451 dnsmasq  txt    REG                8,6  159904 98832 /usr/sbin/dnsmasq
dnsmasq 4451 dnsmasq  mem    REG                8,6   47528 85767 /lib/libnss_files-2.7.so
dnsmasq 4451 dnsmasq  mem    REG                8,6   43480 85770 /lib/libnss_nis-2.7.so
dnsmasq 4451 dnsmasq  mem    REG                8,6   93080 85734 /lib/libnsl-2.7.so
dnsmasq 4451 dnsmasq  mem    REG                8,6   35632 85735 /lib/libnss_compat-2.7.so
dnsmasq 4451 dnsmasq  mem    REG                8,6 1436976 75556 /lib/libc-2.7.so
dnsmasq 4451 dnsmasq  mem    REG                8,6  248432  9070 /usr/lib/libdbus-1.so.3.4.0
dnsmasq 4451 dnsmasq  mem    REG                8,6  127480 60817 /lib/ld-2.7.so
dnsmasq 4451 dnsmasq    0u   CHR                1,3          6270 /dev/null
dnsmasq 4451 dnsmasq    1u   CHR                1,3          6270 /dev/null
dnsmasq 4451 dnsmasq    2u   CHR                1,3          6270 /dev/null
dnsmasq 4451 dnsmasq    3u  sock                0,4         12025 can't identify protocol
dnsmasq 4451 dnsmasq    4u  IPv4              12030           UDP *:domain 
dnsmasq 4451 dnsmasq    5u  IPv4              12031           TCP *:domain (LISTEN)
dnsmasq 4451 dnsmasq    6u  IPv6              12032           UDP *:domain 
dnsmasq 4451 dnsmasq    7u  IPv6              12033           TCP *:domain (LISTEN)
dnsmasq 4451 dnsmasq    8r  FIFO                0,5         12034 pipe
dnsmasq 4451 dnsmasq    9w  FIFO                0,5         12034 pipe
dnsmasq 4451 dnsmasq   10u  unix 0xffff8100378f2840         12038 socket
dnsmasq 4451 dnsmasq   11u  IPv4              12041           UDP *:51493 
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
头像
zszzd
帖子: 156
注册时间: 2007-12-12 22:54

#10

帖子 zszzd » 2008-05-28 19:02

就是说它没有在硬盘上缓冲??
woawoaai
帖子: 1
注册时间: 2012-05-06 9:59

Re: dnsmasq的缓存内容在哪里

#11

帖子 woawoaai » 2012-05-06 10:02

在 etc/hosts 里面
wangshiyao@cecgw.cn
帖子: 1
注册时间: 2014-12-04 15:55
系统: win7

Re: dnsmasq的缓存内容在哪里

#12

帖子 wangshiyao@cecgw.cn » 2014-12-04 16:00

具体有结果了没?
回复