DNS压力测试软件

压力测试软件queryperf
BIND的本身就自带压测软件queryperf,只是默认编译的时候不被编译。

1、下载bind软件,

# wget http://ftp.isc.org/isc/bind9/9.7.3/bind-9.7.3.tar.gz        
# tar zxvf bind-9.7.3.tar.gz        
# cd bind-9.7.3/contrib/queryperf/

2、安装queryperf
看一下README 说的很想详细。

# ./configure
# make

编译完之后会生成queryperf 文件。
使用方法:
实例:

# queryperf -d input_file -s server
  input_file:压力测试的时候读取的文件,
          格式: www.rootman.cn A
                 www.rootman.cn A
 server:要测试dns服务器的IP。

以下是shell脚本,向input_file里边多插入些数据测试。

#!/bin/sh
var=1
while [ $var -le 10000 ]
do
echo "www.rootman.cn A " >> test.txt
var=$(($var + 1 ))
done
exit 0

测试结果:

Statistics:

  Parse input file:     once
  Ended due to:         reaching end of file

  Queries sent:         11659 queries
  Queries completed:    11654 queries
  Queries lost:         5 queries
  Queries delayed(?):   0 queries

  RTT max:              0.015806 sec
  RTT min:              0.000707 sec
  RTT average:          0.003978 sec
  RTT std deviation:    0.001477 sec
  RTT out of range:     0 queries

  Percentage completed:  99.96%
  Percentage lost:        0.04%

  Started at:           Fri Jun 29 16:25:48 2012
  Finished at:          Fri Jun 29 16:25:53 2012
  Ran for:              5.252518 seconds

  Queries per second:   2218.745371 qps

Leave a Reply

Your email address will not be published. Required fields are marked *