[20200219]strace跟蹤設定ENABLE=BROKEN的情況.txt
[20200219]strace跟蹤設定ENABLE=BROKEN的情況.txt
--//使用strace跟蹤設定ENABLE=BROKEN的情況.
--//開始我以為使用strace-f跟蹤sqlplus+連線串,就可以獲得服務端與客戶端程式的相關資訊,實際上錯了,
--//服務端端程式透過監聽程式tnslsnr派生出來的,跟蹤要跟蹤2個程式。
1.環境:
SCOTT@book> @ ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
# echo /proc/sys/net/ipv4/tcp_keepalive* | xargs -n 1 strings -1 -f
/proc/sys/net/ipv4/tcp_keepalive_intvl: 10
/proc/sys/net/ipv4/tcp_keepalive_probes: 4
/proc/sys/net/ipv4/tcp_keepalive_time: 20
$ grep SQLNET.EXPIRE_TIME $ORACLE_HOME/network/admin/sqlnet.ora
# SQLNET.EXPIRE_TIME = 1
--//如果不使用連線串,看到的結果如下:
$ strace -f -r -T -e trace=socket,setsockopt sqlplus scott/book
0.000000 socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 6 <0.000030>
SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 19 08:58:49 2020
Copyright (c) 1982, 2013, Oracle. All rights reserved.
0.017259 socket(PF_FILE, SOCK_STREAM, 0) = 7 <0.000024>
0.000219 socket(PF_FILE, SOCK_STREAM, 0) = 7 <0.000018>
Process 2729 attached
[pid 2729] 0.039015 socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 6 <0.000027>
[pid 2729] 0.004379 socket(PF_FILE, SOCK_STREAM, 0) = 6 <0.000022>
[pid 2729] 0.000204 socket(PF_FILE, SOCK_STREAM, 0) = 6 <0.000019>
[pid 2728] 0.017508 socket(PF_NETLINK, SOCK_RAW, 0) = 7 <0.000033>
[pid 2728] 0.000445 socket(PF_FILE, SOCK_STREAM, 0) = 7 <0.000022>
[pid 2728] 0.000201 socket(PF_FILE, SOCK_STREAM, 0) = 7 <0.000018>
SCOTT@book> @ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
3 1397 2728 DEDICATED 2729 24 199 alter system kill session '3,1397' immediate;
--//你可以看到strace的前面有pid資訊,與下面@spid的顯示一致。
2.跟蹤測試:
$ ps -ef | grep tnslsn[r]
oracle 47619 1 0 Jan15 ? 00:01:04 /u01/app/oracle/product/11.2.0.4/dbhome_1/bin/tnslsnr LISTENER -inherit
--//tnslsnr程式=47619
$ strace -f -r -T -e trace=socket,setsockopt -p 47619
Process 47619 attached with 3 threads - interrupt to quit
[pid 47620] 0.000000 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 13 <0.000027>
[pid 47620] 5.001175 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 13 <0.000026>
[pid 47620] 5.000811 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 13 <0.000027>
[pid 47619] 4.102688 setsockopt(13, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000025>
Process 2770 attached
Process 47619 suspended
Process 2771 attached
Process 47619 resumed
Process 2770 detached
[pid 47619] 0.002904 --- SIGCHLD (Child exited) @ 0 (0) ---
[pid 2771] 0.037125 socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 6 <0.000030>
[pid 2771] 0.008047 socket(PF_FILE, SOCK_STREAM, 0) = 4 <0.000025>
[pid 2771] 0.000228 socket(PF_FILE, SOCK_STREAM, 0) = 4 <0.000018>
[pid 2771] 0.006937 setsockopt(13, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000025>
[pid 2771] 0.001632 setsockopt(13, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0 <0.000039>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[pid 47620] 0.841315 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 13 <0.000030>
[pid 47620] 5.000698 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 13 <0.000028>
[pid 47620] 5.001081 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 13 <0.000026>
^CProcess 47619 detached
Process 47620 detached
Process 47621 detached
Process 2771 detached
$ strace -f -r -T -e trace=socket,setsockopt sqlplus scott/book@"(DESCRIPTION=(ENABLE=BROKEN)(CONNECT_DATA=(SERVICE_NAME=book)(SERVER = DEDICATED))(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))"
0.000000 socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 6 <0.000031>
SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 19 09:01:53 2020
Copyright (c) 1982, 2013, Oracle. All rights reserved.
0.016914 socket(PF_FILE, SOCK_STREAM, 0) = 7 <0.000026>
0.000244 socket(PF_FILE, SOCK_STREAM, 0) = 7 <0.000022>
0.004022 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 7 <0.000031>
0.000150 setsockopt(7, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0 <0.000018>
0.001047 setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000022>
0.056857 setsockopt(7, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0 <0.000030>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0.025672 socket(PF_NETLINK, SOCK_RAW, 0) = 8 <0.000032>
0.000530 socket(PF_FILE, SOCK_STREAM, 0) = 8 <0.000027>
0.000259 socket(PF_FILE, SOCK_STREAM, 0) = 8 <0.000025>
SCOTT@book> @ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
3 1401 2769 DEDICATED 2771 24 201 alter system kill session '3,1401' immediate;
--//服務端程式號=2771,客戶端程式號=2769.
$ ls -l /proc/2769/fd
total 0
lrwx------ 1 oracle oinstall 64 2020-02-19 09:01:53 0 -> /dev/pts/1
lrwx------ 1 oracle oinstall 64 2020-02-19 09:04:26 1 -> /dev/pts/1
lrwx------ 1 oracle oinstall 64 2020-02-19 09:04:26 2 -> /dev/pts/1
lr-x------ 1 oracle oinstall 64 2020-02-19 09:04:26 3 -> /u01/app/oracle/product/11.2.0.4/dbhome_1/sqlplus/mesg/sp1us.msb
lr-x------ 1 oracle oinstall 64 2020-02-19 09:04:26 4 -> /u01/app/oracle/product/11.2.0.4/dbhome_1/sqlplus/mesg/sp2us.msb
lr-x------ 1 oracle oinstall 64 2020-02-19 09:04:26 5 -> /u01/app/oracle/product/11.2.0.4/dbhome_1/sqlplus/mesg/cpyus.msb
lr-x------ 1 oracle oinstall 64 2020-02-19 09:04:26 6 -> /u01/app/oracle/product/11.2.0.4/dbhome_1/rdbms/mesg/ocius.msb
lrwx------ 1 oracle oinstall 64 2020-02-19 09:04:26 7 -> socket:[3017954]
--//檔案控制程式碼7對應socket。
$ ls -l /proc/2771/fd
total 0
lr-x------ 1 oracle oinstall 64 2020-02-19 09:04:57 0 -> /dev/null
l-wx------ 1 oracle oinstall 64 2020-02-19 09:04:57 1 -> /dev/null
lrwx------ 1 oracle oinstall 64 2020-02-19 09:04:57 13 -> socket:[2907877
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
l-wx------ 1 oracle oinstall 64 2020-02-19 09:04:57 2 -> /dev/null
lr-x------ 1 oracle oinstall 64 2020-02-19 09:04:57 3 -> /dev/null
lr-x------ 1 oracle oinstall 64 2020-02-19 09:04:57 4 -> /u01/app/oracle/product/11.2.0.4/dbhome_1/rdbms/mesg/oraus.msb
lr-x------ 1 oracle oinstall 64 2020-02-19 09:04:57 5 -> /proc/2771/fd
lr-x------ 1 oracle oinstall 64 2020-02-19 09:04:57 6 -> /dev/zero
$ netstat -npo | egrep "2769|2771" 2>/dev/null
tcp 0 0 127.0.0.1:18535 127.0.0.1:1521 ESTABLISHED 2769/sqlplus keepalive (8.68/0/0)
tcp 0 0 127.0.0.1:1521 127.0.0.1:18535 ESTABLISHED 2771/oraclebook keepalive (8.68/0/0)
# lsof -p 2769,2771 -P -n | grep 127.0.0.1
sqlplus 2769 oracle 7u IPv4 3017954 0t0 TCP 127.0.0.1:18535->127.0.0.1:1521 (ESTABLISHED)
oracle 2771 oracle 13u IPv4 2907877 0t0 TCP 127.0.0.1:1521->127.0.0.1:18535 (ESTABLISHED)
--//完全能對上。
--//你可以發現在登入時,服務端與客戶端執行都有setsockopt(N, SOL_SOCKET, SO_KEEPALIVE, [1], 4)資訊。
3.再來看看不設定ENABLE=BROKEN的情況:
$ strace -f -r -T -e trace=socket,setsockopt sqlplus scott/book@"(DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=book)(SERVER = DEDICATED))(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))"
0.000000 socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 6 <0.000032>
SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 19 10:11:42 2020
Copyright (c) 1982, 2013, Oracle. All rights reserved.
0.020282 socket(PF_FILE, SOCK_STREAM, 0) = 7 <0.000031>
0.000300 socket(PF_FILE, SOCK_STREAM, 0) = 7 <0.000025>
0.004632 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 7 <0.000034>
0.000853 setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000033>
0.083796 socket(PF_NETLINK, SOCK_RAW, 0) = 8 <0.000035>
0.000468 socket(PF_FILE, SOCK_STREAM, 0) = 8 <0.000030>
0.000230 socket(PF_FILE, SOCK_STREAM, 0) = 8 <0.000032>
SCOTT@book> @ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
3 1421 9580 DEDICATED 9582 24 210 alter system kill session '3,1421' immediate;
--//客戶端沒有執行setsockopt(N, SOL_SOCKET, SO_KEEPALIVE, [1], 4)設定。
$ strace -f -r -T -e trace=socket,setsockopt -p 47619
Process 47619 attached with 3 threads - interrupt to quit
[pid 47619] 0.000000 setsockopt(13, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000021>
Process 9581 attached
Process 47619 suspended
Process 9582 attached
Process 47619 resumed
Process 9581 detached
[pid 47619] 0.002729 --- SIGCHLD (Child exited) @ 0 (0) ---
[pid 9582] 0.039506 socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 6 <0.000035>
[pid 9582] 0.009075 socket(PF_FILE, SOCK_STREAM, 0) = 4 <0.000031>
[pid 9582] 0.000279 socket(PF_FILE, SOCK_STREAM, 0) = 4 <0.000024>
[pid 9582] 0.007223 setsockopt(13, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000026>
[pid 47620] 2.556869 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 13 <0.000029>
[pid 47620] 5.000824 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 13 <0.000064>
^CProcess 47619 detached
Process 47620 detached
Process 47621 detached
Process 9582 detached
--//服務端沒有執行setsockopt(N, SOL_SOCKET, SO_KEEPALIVE, [1], 4)設定。
$ netstat -npo 2>/dev/null | egrep "9580|9582"
tcp 0 0 127.0.0.1:1521 127.0.0.1:19381 ESTABLISHED 9582/oraclebook off (0.00/0/0)
tcp 120 0 127.0.0.1:19381 127.0.0.1:1521 ESTABLISHED 9580/sqlplus off (0.00/0/0)
4.修改sqlnet.ora呢?
$ grep SQLNET.EXPIRE_TIME $ORACLE_HOME/network/admin/sqlnet.ora
SQLNET.EXPIRE_TIME = 1
--//我以前提到過如果設定SQLNET.EXPIRE_TIME,這個引數優先。
$ strace -f -r -T -e trace=socket,setsockopt sqlplus scott/book@"(DESCRIPTION=(ENABLE=BROKEN)(CONNECT_DATA=(SERVICE_NAME=book)(SERVER = DEDICATED))(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))"
0.000000 socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 6 <0.000033>
SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 19 09:16:57 2020
Copyright (c) 1982, 2013, Oracle. All rights reserved.
0.016931 socket(PF_FILE, SOCK_STREAM, 0) = 7 <0.000024>
0.000223 socket(PF_FILE, SOCK_STREAM, 0) = 7 <0.000019>
0.004058 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 7 <0.000030>
0.000094 setsockopt(7, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0 <0.000018>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0.001108 setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000130>
0.060822 setsockopt(7, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0 <0.000047>
0.009481 socket(PF_NETLINK, SOCK_RAW, 0) = 8 <0.000034>
0.000464 socket(PF_FILE, SOCK_STREAM, 0) = 8 <0.000026>
0.000221 socket(PF_FILE, SOCK_STREAM, 0) = 8 <0.000023>
$ strace -f -r -T -e trace=socket,setsockopt -p 47619
Process 47619 attached with 3 threads - interrupt to quit
[pid 47620] 0.000000 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 13 <0.000026>
[pid 47619] 2.550287 setsockopt(13, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000022>
Process 3014 attached
Process 47619 suspended
Process 3015 attached
Process 47619 resumed
Process 3014 detached
[pid 47619] 0.003110 --- SIGCHLD (Child exited) @ 0 (0) ---
[pid 3015] 0.040166 socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 6 <0.000035>
[pid 3015] 0.008989 socket(PF_FILE, SOCK_STREAM, 0) = 4 <0.000032>
[pid 3015] 0.000270 socket(PF_FILE, SOCK_STREAM, 0) = 4 <0.000025>
[pid 3015] 0.007105 setsockopt(13, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000026>
[pid 47620] 2.390704 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 13 <0.000032>
[pid 47620] 5.000647 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 13 <0.000026>
^CProcess 47619 detached
Process 47620 detached
Process 47621 detached
Process 3015 detached
SCOTT@book> @ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
3 1413 3013 DEDICATED 3015 24 206 alter system kill session '3,1413' immediate;
$ netstat -npo | egrep " 3013| 3015"
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:1521 127.0.0.1:18720 ESTABLISHED 3015/oraclebook off (0.00/0/0)
tcp 0 0 127.0.0.1:18720 127.0.0.1:1521 ESTABLISHED 3013/sqlplus keepalive (2.38/0/0)
--//你可以發現在11g下使用ENABLE=BROKEN,sqlnetora設定SQLNET.EXPIRE_TIME=1的情況下,客戶端執行setsockopt(7, SOL_SOCKET, SO_KEEPALIVE, [1], 4)。
--//而服務端沒有(後一列顯示off)。
--//也就是11g設定SQLNET.EXPIRE_TIME,使用DCD探測沒有使用TCP KEEPALIVE套接字選項來檢查連線是否仍然可用。
--//實際上12c改變這種情況,12c會利用SQLNET.EXPIRE_TIME設定,使用DCD探測現在將使用TCP KEEPALIVE套接字選項來檢查連線是否仍然可用。
--//測試18c的情況:
# grep -i SQLNET.EXPIRE_TIME /u01/app/oracle/product/18.0.0/db_home/network/admin/sqlnet.ora
SQLNET.EXPIRE_TIME=1
# echo /proc/sys/net/ipv4/tcp_keepalive* | xargs -n 1 strings -1 -f
/proc/sys/net/ipv4/tcp_keepalive_intvl: 75
/proc/sys/net/ipv4/tcp_keepalive_probes: 9
/proc/sys/net/ipv4/tcp_keepalive_time: 7200
--//這是預設設定。
SYS@192.168.x.x:1521/orclcdb> select BANNER from v$version;
BANNER
---------------------------------------------------------------------------
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
SYS@192.168.x.x:1521/orclcdb> @ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ---------- ---------- ------ --- ---------- --------------------------------------------------
282 45262 6796:7500 DEDICATED 24503 70 6487 alter system kill session '282,45262' immediate;
# netstat -npo | grep 24503
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (27.72/0/0)
--//這臺伺服器竟然使用tcp6.
# seq 1000 | xargs -IQ bash -c "netstat -npo 2>/dev/null | egrep 'ESTABLISHED 24503'| egrep 'oracleorclcdb|sqlplus' ;sleep 0.999"
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (13.75/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (12.65/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (11.54/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (10.42/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (9.31/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (8.19/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (7.09/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (5.98/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (4.88/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (3.76/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (2.65/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (1.55/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (0.44/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (5.35/0/0)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (4.24/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (3.14/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (2.02/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (0.92/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (53.94/0/0)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (52.82/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (51.74/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (50.63/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (49.52/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (48.41/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (47.30/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (46.19/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (45.08/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (43.98/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (42.87/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (41.77/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (40.65/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (39.53/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (38.42/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (37.32/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (36.22/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (35.11/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (34.00/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:52938 ESTABLISHED 24503/oracleorclcdb keepalive (32.89/0/0)
^C
--//SQLNET.EXPIRE_TIME=1,相當於60秒。很奇怪netstat看到的分2部分,一部分是6->0,另一部分54->0 .加起來是6+54=60秒。
--//很奇怪的現象,注意看下劃線部分。
--//我設定SQLNET.EXPIRE_TIME=2,看到的情況如下:
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:54086 ESTABLISHED 28143/oracleorclcdb keepalive (5.41/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:54086 ESTABLISHED 28143/oracleorclcdb keepalive (4.42/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:54086 ESTABLISHED 28143/oracleorclcdb keepalive (3.41/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:54086 ESTABLISHED 28143/oracleorclcdb keepalive (2.41/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:54086 ESTABLISHED 28143/oracleorclcdb keepalive (1.41/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:54086 ESTABLISHED 28143/oracleorclcdb keepalive (0.41/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:54086 ESTABLISHED 28143/oracleorclcdb keepalive (113.72/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:54086 ESTABLISHED 28143/oracleorclcdb keepalive (112.73/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:54086 ESTABLISHED 28143/oracleorclcdb keepalive (111.73/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:54086 ESTABLISHED 28143/oracleorclcdb keepalive (110.73/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:54086 ESTABLISHED 28143/oracleorclcdb keepalive (109.74/0/0)
tcp6 0 0 192.168.x.x:1521 192.168.yy.y:54086 ESTABLISHED 28143/oracleorclcdb keepalive (108.74/0/0)
--// 114+6 = 120.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2676174/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20200219]strace跟蹤設定ENABLE=BROKEN的情況(網路的情況).txt
- [20211011]跟蹤freespace空間的變化情況.txt
- 除錯跟蹤利器---strace除錯
- [20200218]ENABLE=BROKEN在連線串中.txt
- oracle ENABLE=BROKENOracle
- [20200218]ENABLE=BROKEN在連線串中4.txt
- [20210201]dblink建立連線串使用ENABLE=BROKEN.txt
- [20200220]關於SQLNET.EXPIRE_TIME and ENABLE=BROKEN的總結.txtSQL
- [20200218]無ENABLE=BROKEN在連線串中3.txt
- [20190402]跟蹤vmstat.txt
- [20200219]log_archive_dest_1定義問題.txtHive
- Oracle ENABLE=broken引數與TCP KeepAliveOracleTCP
- [20210603]如何跟蹤索引分裂.txt索引
- 使用dbms_monitor.session_trace_enable跟蹤一個會話Session會話
- [20231025]跟蹤rename操作2.txt
- Linux命令strace跟蹤程式的系統呼叫-linux學習用什麼書Linux
- [20190401]跟蹤dbms_lock.sleep呼叫.txt
- [20211013]閱讀ldd原始碼跟蹤.txt原始碼
- [20231024]NULL值在索引的情況.txtNull索引
- [20190314]使用strace注意的問題.txt
- [20190917]oracle跟蹤事件簡單寫法.txtOracle事件
- [20210220]gdb跟蹤邏輯讀2.txt
- [20181217]strace使用問題.txt
- [20200818]12c 10046跟蹤時間戳.txt時間戳
- [20210401]跟蹤sqlplus登入執行了什麼.txtSQL
- 【TRACE】如何設定或動態跟蹤Oracle net偵聽器Oracle
- [20211227]抽取跟蹤檔案中的繫結變數值.txt變數
- [20200326]dbms_monitor跟蹤與SQL語句分析.txtSQL
- 好用的時間跟蹤定時器:Eon Timer for Mac定時器Mac
- [20180310]12c exp 無法dirct的情況.txt
- [20220216]為什麼出現這樣的情況.txt
- [20191221]12c查詢跟蹤檔案內容.txt
- [20200818]12c 10046跟蹤時間戳2.txt時間戳
- [20240920]跟蹤library cache lock library cache pin使用gdb.txt
- [20240824]跟蹤library cache lock library cache pin使用gdb.txt
- [20200402]strace過濾使用awk問題.txt
- [20211209]pdb資料庫kill job遇到的奇怪情況.txt資料庫
- [20211203]演示job啟動時間改變的情況.txt