# cat Start_mysqlslap.sh
#!/bin/sh
HOST=192.168.56.200
PORT=4040
USER=mysql
PASS=mysql
SOCKET=/database/mysql/mysql.sock
ENGINE=$1
THREAD=$2
SIZE=$3
DATETIME=`date +"%Y-%m-%d %H:%M:%S"`
LOG=/download/BenchScript/output/mysqlslap_"$HOST"_"$ENGINE".log
echo "*********************** BenchMark Information ***********************" >> $LOG
echo " IP Address : $HOST:$PORT" >> $LOG
echo " Table Type : $ENGINE" >> $LOG
echo " Table Rows : $SIZE" >> $LOG
echo " Search Thread Size : $THREAD" >> $LOG
echo " Current Time : $DATETIME" >> $LOG
echo "*********************************************************************" >> $LOG
mysqlslap --no-defaults \
--host=$HOST \
--user=$USER \
--password=$PASS \
--port=$PORT \
--socket=$SOCKET \
--auto-generate-sql \
--auto-generate-sql-write-number=$SIZE \
--engine=myisam \
--number-int-cols=2 \
--number-char-cols=3 \
--engine=$ENGINE \
--concurrency=$THREAD \
--iterations=10000 \
--number-of-queries=1 \
--auto-generate-sql-load-type=read \
>> $LOG
댓글 없음:
댓글 쓰기