研究背景
測試環(huán)境
1. 操作系統(tǒng):redhat7
2. 數(shù)據(jù)庫版本:19.3.0
3. 架構(gòu):單機
測試過程
$vi conn.sh
sqlplus sys/system@192.168.10.130:1521/orcl as sysdba
select * from v$version;
exit;
$vi conn1.sh
sqlplus sys/system@192.168.10.130:1521/orcl1 as sysdba
select * from v$version;
exit;
$vi conn2.sh
sqlplus sys/system@192.168.10.130:1521/orcl2 as sysdba
select * from v$version;
exit;
$vi connect.sh
for i in {1..200000}
do
for j in {1..40}
do
sh /home/oracle/conn.sh
done
done
EOF
$vi connect1.sh
for i in {1.. 200000}
do
for j in {1. .40}
do
sh /home/oracle/conn1.sh
done
done
EOF
…
$vi connect2.sh
for i in {1.. 200000}
do
for j in {1. .40}
do
sh /home/oracle/conn2.sh
done
done
EOF
…
nohup sh connect.sh > /dev/null 2>&1&
nohup sh connect1.sh > /dev/null 2>&1&
nohup sh connect2.sh > /dev/null 2>&1&
[oracle@orcl:/u01/app/oracle/diag/tnslsnr/orcl/listener/trace]$ tail -20f listener.log
$grep 18-FEB-2022 listener.log | sed s/*.*SERVICE_NAME=/ /g;s/).*HOST=/ /g;s/).*$//g | awk
{if(NF==4){print "insert into t_tab
values("$1","$2","$3","$4");"}} >
/home/oracle/insert.sql
--a1 日期;
--a2 時間;
--a3 服務名;
--a4 客戶端ip。
Create table t_tab( a1 varchar2(50),a2 varchar2(50),a3 varchar2(50),a4 varchar2(50));
@/home/oracle/insert.sql
select a1,substr(a2,1,5),a3,count(1) from t_tab where a3 in (orcl,orcl1,orcl2) group by a1,substr(a2,1,5),a3 order by count(1) desc;
測試總結(jié)
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://specialneedsforspecialkids.com/yun/129601.html
閱讀 1346·2023-01-11 13:20
閱讀 1684·2023-01-11 13:20
閱讀 1132·2023-01-11 13:20
閱讀 1858·2023-01-11 13:20
閱讀 4100·2023-01-11 13:20
閱讀 2704·2023-01-11 13:20
閱讀 1385·2023-01-11 13:20
閱讀 3597·2023-01-11 13:20