#还是使用之前的脚步来进行测试 #Author: Kconnie Pong [email protected]:~> MoreLoad_balance.SH #!/bin/Bash forIinch{1.. +} Do Echo$i Sqlplus-s System/[email protected] <<EOFSelectinstance_name from v\ $instance; EOFSleep 1 DoneExit0[email protected]:~>./load_balance.SH>load_bal.log #查看日志 [email protected]:~>grepOrcla Load_bal.log |WC-l [email protected]:~>grepORCLB Load_bal.log |WC-l #查看监听器的日志 [email protected]:/u01/oracle/db/network/log>grepEstablish Listener_bo2dbp.log |WC-l [email protected]:/u01/oracle/db/network/log>grepINSTANCE_NAME=ORCL Listener_bo2dbp.log |WC-l #从上面的查询中可以得知, the node BO2DBP received a total of 894 connection requests, while 415 connection requests were #因此 forwarded by Bo2dbs, actually the number of actual connection requests initiated from the client to BO2DBP was 894-415=479#下面来看在节点bo2dbs上的监听日志 [email protected]:/u01/oracle/db/network/log>grepEstablish Listener_bo2dbs.log |WC-l [email protected]:/u01/oracle/db/network/log>grepINSTANCE_NAME=ORCL Listener_bo2dbs.log |WC-l #从上面的查询中可知, the node Bo2dbs received a total of 665 connection requests, while 144 connection requests were #因此 forwarded by BO2DBP, actually the number of actual connection requests originating from the client to Bo2dbs was 655-144=511#从上面的结果可知, #基于客户端的连接请求数为节点bo2dbp为479, node Bo2dbs is 511 #监听器路由到本地实例数目为, node bo2dbp,479-144=335, Node Bo2dbs,511-415= the#远程监听器路由道本地实例的数据为, Node BO2DPB is 415, node Bo2dbs is 144 #监听器路由的概念是指基于服务器端的负载均衡 # That is, the server-side listener determines that the current connection request is forwarded to local or remote based on its own and the load of the remote listener, which is the route.
Oracle RAC Test