sqlplus parallel connect sqlplus并发连接压力测试
#!/bin/bashfunction a_sub {
count=0
while [ $count -lt 3882386 ] # Set up a loop control
do # Begin the loop
count=`expr $count + 1` # Increment the counter
sqlplus / as sysdba << EOF
exit;
EOF
done
}
tmp_fifofile="/tmp/$.fifo"
mkfifo $tmp_fifofile
exec 6<>$tmp_fifofile
rm $tmp_fifofile
thread=100
for ((i=0;i<$thread;i++));do
echo
done >&6
for ((i=0;i<5000;i++));do#
read -u6
{
a_sub && {
echo "a_sub is finieshed"
} || {
echo "sub error"
}
echo >&6
} &
sleep 1
done
wait
exec 6>&-
exit 0
页:
[1]