OSwatcher on Exadata51CTO博客 - 超凡娱乐

OSwatcher on Exadata51CTO博客

2019年04月26日08时23分12秒 | 作者: 浩轩 | 标签: 修正,日志,发动 | 浏览: 2139

      OSwatcher作为Oracle官方引荐的OS层面运转状况检测的脚本东西。在Exadata是默许现已装置。

可是Exadata是如安在系统发动后,主动发动OSwatcher呢?咱们怎么去修正OSwatcher的参数,来调整监控和日志保存的战略呢?

     本文正是介绍,从系统发动到OSwatcher运转,中心经历过的脚本调用,以及怎么修正OSwatcher参数的。

1. 首要查看rc.local文件,能够发现/etc/rc.d/rc.Oracle.Exadata

# vi /etc/rc.d/rc.local
-
# BEGIN DO NOT REMOVE Added by Oracle Exadata #
if [ -x /etc/rc.d/rc.Oracle.Exadata ]; then
  . /etc/rc.d/rc.Oracle.Exadata <<<<<<<<<<<<<<<<<<<<<<This script will be run automaticlly, when the OS starts
fi
# END DO NOT REMOVE Added by Oracle Exadata #
-

2. 查看rc.Oracle.Exadata,找到/opt/oracle.cellos/vldrun -all

# vi /etc/rc.d/rc.Oracle.Exadata
-
# Perform validations step
/opt/oracle.cellos/vldrun -all <<<<<<<<<<<<<<<<<<<<<<This script will be run automaticlly, when the OS starts
-

3. 查看当时OSwatcher的设定,每15秒搜集一次,生成的日志保存168小时(7天),bzip2的紧缩形式,最大日志尺度是3G

# ps -ef | grep OSW
root 15962 1 0 04:00 pts/1 00:00:00 /bin/ksh ./OSWatcher.sh 15 168 bzip2 3
root 15994 15962 0 04:00 pts/1 00:00:00 /bin/ksh ./OSWatcherFM.sh 168 3
root 16272 9529 0 04:00 pts/1 00:00:00 grep OSW

4. 脚本/opt/oracle.cellos/vldrun会调用oswatcher脚原本发动oswatcher

# ls -al /opt/oracle.cellos/validations/init.d/oswatcher
-r-xr-x- 1 root root 5128 Aug 19 03:39 oswatcher
# chmod 750 oswatcher <<<<<<<<<<<<<<<<<<<<<<<<Change the right, then we can edit it as per our expected.
# ls -al oswatcher
-rwxr-x- 1 root root 5128 Aug 19 03:39 oswatcher

5. 查看当时oswatcher脚本中的设定,并修正(本次修正将原有的最大保存3G的日志,修正为最大日志尺度为4G)

# vi oswatcher

fi
(umask 0037; nohup ./startOSW.sh 15 168 bzip2 4 >/var/log/cellos/start_oswatcher.log 2>&1 &)& <<<<<<<<<<<<change this part of the script, will let the script run as per our expected.
# Dont direct logs to startosw.log. It grows too large and fast
# (nohup ./startOSW.sh 15 168 bzip2 3 >/dev/null 2>&1 &)&
popd >/dev/null

6. 中止oswatcher

#/opt/oracle.oswatcher/osw/stopOSW.sh
# ps -ef | grep OSW
root 10528 9529 0 03:59 pts/1 00:00:00 grep OSW
    
7. 手动发动oswatcher
# /opt/oracle.cellos/vldrun -script oswatcher
Logging started to /var/log/cellos/validations.log
Command line is ./validations/bin/vldrun.pl -quiet -script oswatcher
Run validation oswatcher - PASSED
The each boot completed with SUCCESS

8.再次查看OSwatcher的设定,最大日志尺度现已改为4G

# ps -ef|grep OSW
root 109041 1 0 03:37 pts/1 00:00:00 /bin/ksh ./OSWatcher.sh 15 168 bzip2 4
root 109073 109041 0 03:37 pts/1 00:00:00 /bin/ksh ./OSWatcherFM.sh 168 4
root 109348 59019 0 03:37 pts/1 00:00:00 grep OSW

更对oswatcher细节,能够参阅以下官方文档(注:现在文档1585389.1中现已记载怎么永久修正exadata上osw的设定, 可是自己测验的时分,该文档并没有相关记载)

OSWatcher does not Retain Data for the Full Retention Period Specified (Doc ID 1585389.1)

OSWatcher Black Box (Includes: [Video]) (Doc ID 301137.1)

版权声明
本文来源于网络,版权归原作者所有,其内容与观点不代表超凡娱乐立场。转载文章仅为传播更有价值的信息,如采编人员采编有误或者版权原因,请与我们联系,我们核实后立即修改或删除。

猜您喜欢的文章