Oracle12c R2注意事項: 多個”/usr/bin/ssh -o StrictHostKeyChecking… /sbin/ifconfig -a”程序導...
12c R2 RAC環境下又一個問題特性,同樣會導致cpu使用率高。
$ ps -ef|grep ifconfig root 19141 1 0 06:25 ? 00:00:00 sh -c /bin/su -l grid -c "/usr/bin/ssh -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=5 ANBOB2 /sbin/ifconfig -a" 2>&1 root 13442 18941 99 06:25 ? 06:07:08 /bin/su -l grid -c /usr/bin/ssh -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=5 ANBOB2 /sbin/ifconfig -a grid 26911 23166 0 12:32 pts/1 00:00:00 grep ifconfig root 23231 1 0 Jan23 ? 00:00:00 sh -c /bin/su -l grid -c "/usr/bin/ssh -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=5 ANBOB2 /sbin/ifconfig -a" 2>&1 root 62143 23231 99 Jan23 ? 14:29:31 /bin/su -l grid -c /usr/bin/ssh -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=5 ANBOB2 /sbin/ifconfig -a root 77112 1 0 10:30 ? 00:00:00 sh -c /bin/su -l grid -c "/usr/bin/ssh -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=5 ANBOB2 /sbin/ifconfig -a" 2>&1 root 75443 77170 99 10:30 ? 02:02:37 /bin/su -l grid -c /usr/bin/ssh -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=5 ANBOB2 /sbin/ifconfig -a $top PIDUSER PR NI VIRT RESSHRS %CPU %MEM TIME+ COMMAND 62254 root 25 0 98.8m 1392 1104 R 100.0 0.0 851:33.36 su 57942 root 25 0 98.8m 1400 1104 R 99.90.0 349:10.86 su 52171 root 25 0 98.8m 1404 1104 R 99.90.0 104:39.33 su
根據MOS note# 2340905.1記錄是Bug 24692439 : LNX64-12.2-DIAGSNAP: AUXILIARY CMDS GENERATED BY DIAGSNAP WOULD HOG CPU FOREVER。
解決方法是禁用diagsnap,然後手動kill掉這些su 程序。
什麼是diagsnap?
為了當分析節點重啟和節點驅逐故障時,避免因缺少網路和作業系統級資訊無法定位,引入diagsnap並與GI整合,diagsnap是12.1.0.2 GI引入的新程序,CHM的osysmod管理diagsnap資源,該資源收集彌補CHM通常不收集的其他OS統計資訊。diagsnap採集是每15分鐘自動執行一次, 有些特列情況也會觸發diagsnap, 如下:
1. cssd發現丟失網路心跳時
2. gipcd發現interfaces 啟停變化時
3. gipcd rank events
diagsnap會呼叫執行下面的作業系統命令:
iostatnetstatlsof <gipcd pid/ocssd pid/crsd pid/ohasd pid>arpifconfigping over the private interconnecttcpdumptop
禁用diagsnap
以GI owner身份執行.(grid)
$GI_HOME/bin/oclumon manage -disable diagsnap
如果12.1 版本上執行不成功,需要以root身份執行diagsnap.pl deregister” ,手動編輯每個節點的$GI_HOME/crf/admin/crf<hostname>.ora檔案,確認PSTACK=DISABLE 和DIAGSNAP=DISABLE