分类:
2007-09-19 10:22:09
四.应用
1. 帮助
###############show record##################
Find Zone=> bdbhpt -s -z test.com
Find Host=> bdbhpt -s -z test.com -h www
Find Client=> bdbhpt -s -c test.com
###############show record##################
Drop Zone=> bdbhpt -d -z test.com
Drop Host=> bdbhpt -d -z test.com -h www
Drop Client=> bdbhpt -d -c test.com
###############show record##################
New Create=> bdbhpt -n -z test.com -h @ -j "@ 10 SOA ns1.example.com. root.example.com. 2 2800 7200 604800 86400" -m /dns-root -f dbfile
Append Data=> bdbhpt -a -z test.com -h www -j "www
Append Client=> bdbhpt -a -c test.com -i 192.168.1.11
1. 添加数据
A: 添加SOA
新建库:
bdbhpt -n -z test.com -h @ -j "@ 86400 SOA ns1.test.com. hostmaster.test.com. 2006112401 28800 7200 604800 86400" -m /dns-root -f demo.db
追加:
bdbhpt -a -z test1.com -h @ -j "@ 86400 SOA ns1.test1.com. hostmaster.test1.com. 2006112401 28800 7200 604800 86400" -m /dns-root -f demo.db
添加A记录:
bdbhpt -a -z test.com -h www -j "www
添加client:
bdbhpt -a -c test.com -i 192.168.1.10 -m /dns-root -f demo.db
2. 查找数据
查找zone:
bdbhpt -s -z test.com -m /dns-root/test/main/ -f demo.db
查找host:
bdbhpt -s -z test.com -h www -m /dns-root/test/main/ -f demo.db
查找client:
bdbhpt -s -c test.com -m /dns-root/test/main/ -f demo.db
3. 删除数据
删除整个client:
bdbhpt -d -c test.com -m /dns-root/test/main/ -f demo.db
删除一个client的IP:
bdbhpt -d -c test2.com -i 192.168.1.15 -m /dns-root/test/main/ -f demo.db
删除整个zone:
bdbhpt -d -z test.com -m /dns-root/test/main/ -f demo.db
删除zone所属host:
bdbhpt -d -z test2.com -h www -m /dns-root/test/main/ -f demo.db
删除zone所属host的一个记录:
bdbhpt -d -z test2.com -h www -j "4 www
五.测试
测试环境: |
linux AS4 kernel: |
|
|
| ||||
|
|
bind |
|
|
|
|
| |
测试工具: |
DnsPerf |
|
|
|
| |||
|
|
|
|
|
|
|
|
|
服务器配置: |
双cpu Intel(R) Xeon(TM) CPU 3.00GHz L2 |
|
| |||||
|
|
CPU: L2 cache: 2048K |
|
|
|
| ||
|
|
RAM: |
|
|
|
|
|
|
测试方法 |
: |
查询10个WIDIP,时间限定6分,不同测试点并发,查看其CPU与RAM的使用情况以及qps数 |
Node |
Chn-hz-3-574 |
Cnc-xa-1-571 |
Chn-fs-1-573 |
Chn-sh-2-571 |
Queries sent |
173295 |
27033 |
90522 |
178760 |
Queries completed |
173274 |
26927 |
90259 |
178512 |
Queries lost |
21 |
106 |
263 |
248 |
Percentage completed |
99.99% |
99.61% |
99.71% |
99.86% |
Percentage lost |
0.01% |
0.39% |
0.29% |
0.14% |
Queries per second |
481.27 |
73.45 |
245.83 |
484.41 |
Cpu占用:80%左右
Ram占用:0.2%
chinaunix网友2008-01-14 14:47:39
你好,能把你最终的bdbhpt.c程序给我一份吗? MAIL/MSN: alex_wang_2003@hotmail.com QQ: 577507