[20170322]Private strand flush not complete.txt
--//探究一下生产系统出现alert大量出现Private strand flush not complete.这台服务去年4,5月我做了优化,前面设置sga太小,导致数
--//据缓存很小.
SYS@xxxxxx> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
$ grep "^Private strand flush not complete" alert_xxxxxx.log |wc
931 4655 31654
--//总共出现931次.
$ grep -B1 "^Private strand flush not complete" alert_xxxxxx.log| grep ^Thread|wc
931 7448 44201
--//次数也是一样.
--//还可以发现同时出现Thread 1 cannot allocate new log, sequence NNN次数一致.说明主要产生日志量很大,在线日志文件小导致切
--//换频繁来不及归档.
$ grep -B2 "^Private strand flush not complete" alert_xxxxxx.log| grep "[0-5][0-9] 201[567]$"|wc
581 2905 14525
-//可以发现Private strand flush not complete的前面第2行出现时间测试是581次.
--//取出时间.
$ grep -B2 "^Private strand flush not complete" alert_xxxxxx.log | grep -A1 "^--" | grep "[0-5][0-9] 201[567]$" >> aa.txt
$ wc aa.txt
580 2900 14500 aa.txt
--//差1.主要问题第一个输出前面没有--.不影响计算.
$ cut -d" " -f5,2 aa.txt | uniq -c
14 Jan 2015
25 Feb 2015
34 Mar 2015
34 Apr 2015
29 May 2015
37 Jun 2015
39 Jul 2015
42 Aug 2015
36 Sep 2015
41 Oct 2015
40 Nov 2015
41 Dec 2015
42 Jan 2016
40 Feb 2016
23 Mar 2016
10 Apr 2016
4 May 2016
5 Jun 2016
1 Jul 2016
7 Aug 2016
6 Sep 2016
3 Oct 2016
8 Nov 2016
7 Dec 2016
6 Jan 2017
2 Feb 2017
4 Mar 2017
--//大部分出现在2015-2016年4月之前.而链接http://blog.itpub.net/267265/viewspace-2102914/提示我2016年3月7号开始介入优化.
--//从这里也可以看出优化是有效果的.
$ grep -B3 "^Private strand flush not complete" alert_xxxxxx.log | grep -A1 "^--" | grep ":[0-5][0-9] 201[567]$"
Tue Mar 31 08:06:22 2015
Mon Apr 13 08:20:57 2015
Tue May 05 08:15:36 2015
--//忽略
$ grep -B4 "^Private strand flush not complete" alert_xxxxxx.log | grep -A1 "^--" | grep ":[0-5][0-9] 201[567]$"|wc
447 2235 11175
$ cut -d" " -f5,2 ab.txt | uniq -c
12 Jan 2015
17 Feb 2015
25 Mar 2015
20 Apr 2015
17 May 2015
25 Jun 2015
28 Jul 2015
30 Aug 2015
27 Sep 2015
35 Oct 2015
35 Nov 2015
33 Dec 2015
35 Jan 2016
30 Feb 2016
18 Mar 2016
9 Apr 2016
4 May 2016
4 Jun 2016
1 Jul 2016
7 Aug 2016
6 Sep 2016
2 Oct 2016
8 Nov 2016
7 Dec 2016
6 Jan 2017
2 Feb 2017
4 Mar 2017
--//出现次数多的基本在2016年4月之前,而这个时候数据缓存很小.