系统 CentOS 5.1 x86_64

Step1 install ltp (linux test packages)

rpm -ivh bglibs-1.104-1.x86_64.rpm bglibs-devel-1.104-1.x86_64.rpm

cp /usr/include/unix/* /usr/include/sys/

tar xvzf ltp-full-20081130.tgz

make && make install

Step2 install jdbc

http://dev.mysql.com/downloads/connector/j/5.1.html

tar xvzf mysql-connector-java-5.1.7.tar.gz

cp mysql-connector-java-5.1.7/mysql-connector-java-5.1.7-bin.jar ltp-full-20081130/testcases/DOTS/

export CLASSPATH=$CLASSPATH:path—DOTS下的 Dots.jar 和 mysql-connector-java-5.1.7-bin.jar

比如我的

export CLASSPATH=$CLASSPATH:/root/test_db/ltp-full-20081130/testcases/DOTS/Dots.jar:/root/test_db/ltp-full-20081130/testcases/DOTS/mysql-connector-java-5.1.7-bin.jar

Step3 测试

先执行

sh PerfMon.sh 开启监听端口,就是监视mysql情况

再执行

cp config.ini mysql.ini

修改如下信息

UserID = dots

Password = passwd

DriverClass = org.gjt.mm.mysql.Driver

URL = jdbc:mysql://localhost:3306/TESTDB?user=dots&password=passwd

SERVER_IP = localhost

最后开启测试

chmod +x Dots.sh

./Dots.sh BTCJ1

./Dots.sh BTCJ2

./Dots.sh BTCJ3

./Dots.sh BTCJ4

./Dots.sh BTCJ5

./Dots.sh BTCJ6

  1. Q: make LTP 出错

signalfd01.c:58:26: error: sys/signalfd.h: No such file or directory

make[4]: *** [signalfd01] Error 1

A: 安装 bglibs

  1. 安装监控软件ganglia/munin

参考:

http://ltp.sourceforge.net/

http://tuxmining.blogspot.com/2008/05/mysql-51-2-weeks-of-stresstests.html

http://ganglia.sourceforge.net/

http://munin.sourceforge.net/