研究背景
測試環境
1. 操作系統:redhat7
2. 數據庫版本:19.3.0
3. 架構:單機
測試過程
$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;
測試總結
文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。
轉載請注明本文地址:http://m.specialneedsforspecialkids.com/yun/129601.html
閱讀 1353·2023-01-11 13:20
閱讀 1699·2023-01-11 13:20
閱讀 1211·2023-01-11 13:20
閱讀 1902·2023-01-11 13:20
閱讀 4161·2023-01-11 13:20
閱讀 2751·2023-01-11 13:20
閱讀 1397·2023-01-11 13:20
閱讀 3664·2023-01-11 13:20