queryperf是bind自带的测试软件,所以我们直接上官网下载bind,解压后就能找到queryperf的安装包。解压后,找到目录 contrib ,bind自带的第三方软件全在这个目录里面,我们要用到的queryperf也在里面。
ll contrib/ -rw-r--r-- 1 slim slim 4181 Feb 18 09:56 check5011.pl -rw-rw-r-- 1 slim slim 3919 Apr 17 15:58 check-secure-delegation.pl -rw-r--r-- 1 slim slim 3900 Feb 18 09:56 check-secure-delegation.pl.in drwxr-xr-x 2 slim slim 4096 Apr 17 15:58 dane drwxr-xr-x 6 slim slim 4096 Apr 17 15:58 dlz drwxr-xr-x 3 slim slim 4096 Apr 17 15:58 idn drwxr-xr-x 2 slim slim 4096 Apr 17 15:58 linux drwxr-xr-x 2 slim slim 4096 Apr 17 15:58 named-bootconf drwxr-xr-x 2 slim slim 4096 Apr 17 15:58 nanny drwxr-xr-x 3 slim slim 4096 Apr 17 15:58 nslint-2.1a3 drwxr-xr-x 2 slim slim 4096 Apr 17 15:58 perftcpdns drwxr-xr-x 2 slim slim 4096 Apr 17 15:58 pkcs11-keygen drwxr-xr-x 2 slim slim 4096 Apr 17 15:58 query-loc-0.4.0 drwxr-xr-x 5 slim slim 4096 Apr 17 15:58 queryperf -rw-r--r-- 1 slim slim 1462 Feb 18 09:56 README drwxr-xr-x 9 slim slim 4096 Apr 17 15:58 sdb drwxr-xr-x 5 slim slim 4096 Apr 17 15:58 zkt -rw-rw-r-- 1 slim slim 3414 Apr 17 15:58 zone-edit.sh -rw-r--r-- 1 slim slim 3386 Feb 18 09:56 zone-edit.sh.in进入queryperf目录,开始编译安装。可以使用 ./configure -h 查看安装帮助,可以指定安装目录,以及bind相关目录,
www.baidu.com A www.baidu.cn cname www.zhutianwei.cn A zhutianwei.cn NS 3evip.cn MX pop3.3evip.cn cname www.slimsmart.cn A slimsmart.cn NS www.7k9.cn A test.7k9.cn A这几条记录还远远不够,我们可以多添加写记录,上万条。
$ queryperf -d querytest.txt -s 192.168.110.71 DNS Query Performance Testing Tool Version: $Id: queryperf.c,v 1.12 2007/09/05 07:36:04 marka Exp $ [Status] Processing input data [Status] Sending queries (beginning with 192.168.110.71) [Status] Testing complete Statistics: Parse input file: once Ended due to: reaching end of file Queries sent: 1756920 queries Queries completed: 1756920 queries Queries lost: 0 queries Queries delayed(?): 0 queries RTT max: 0.272069 sec RTT min: 0.000071 sec RTT average: 0.001332 sec RTT std deviation: 0.001199 sec RTT out of range: 0 queries Percentage completed: 100.00% Percentage lost: 0.00% Started at: Thu Apr 23 13:05:46 2015 Finished at: Thu Apr 23 13:07:44 2015 Ran for: 117.916566 seconds Queries per second: 14899.687632 qpsQPS:14899.687632,可以多测试几次取平均值。
参考文章:
http://wubinary.blog.51cto.com/8570032/1379595