#参数
ip=192.168.60.152
db=insert02
tb=insert_tr151_3
a=0
a=`mysql -h $ip -P 3306 --database=$db -e"select count(*) from $tb;" | awk 'NR>1'`
#echo "a = $a"
let "b = $a / 1000"
for ((i=1;i
do
let "f=$i*1000"
#echo "f = $f"
let "h = $f - 999"
#echo "h = $h"
c=`mysql -h $ip -P 3306 --database=$db -e"select UNIX_TIMESTAMP(test_begin_time) from $tb limit $h,1;" | awk 'NR>1'`
d=`mysql -h $ip -P 3306 --database=$db -e"select UNIX_TIMESTAMP(test_end_time) from $tb limit $f,1;" | awk 'NR>1'`
#echo "c = $c "
#echo "d = $d"
let "g = $d - $c"
#echo "g = $g"
let "sudu = 1000000 / $g"
echo "$sudu"
done
阅读(743) | 评论(0) | 转发(0) |