osw 安装部署及日志收集
ahf 下载地址
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=79120892788894&parent=DOCUMENT&sourceId=2828415.1&id=2550798.1&_afrWindowMode=0&_adf.ctrl-state=2fkbnnc7m_686
安装
用root用户安装,目录和子目录权限必须都是root用户,否咋报错如下:
[ERROR] : AHF-00014: AHF Location /u01/oracle.ahf is not owned by root in directory hierarchy
./ahf_setup -ahf_loc /ahf/oracle.ahf -data_dir /ahf/oracle.ahf/data
1、Starting oswbb
To start the oswbb utility execute the startOSWbb.sh shell script from the directory where oswbb was installed. This script has 2 arguments which control the frequency that data is collected and the number of hour's worth of data to archive.
ARG1 = snapshot interval in seconds.
ARG2 = the number of hours of archive data to store.
ARG3 = (optional) the name of a compress utility to compress each file automatically after it is created.
ARG4 = (optional) an alternate (non default) location to store the archive directory.
./OSWatcher.sh 30 48 None /tmp/archive/
注:
rac需要处理private.net,在osw8以上不需要在手动建private.net,在osw8以下手动cp Exampleprivate.net private.net,删除不需要的操作系统,填写正确的私有的ip地址
[+ASM1]@ht01[/home/grid/soft/oswbb]$cat private.net
echo "zzz ***"`date`
traceroute -r -F 192.168.0.10
traceroute -r -F 192.168.0.11
rm locks/lock.file
如果ps不收集数据 指定变量OSW_PS_SAMPLE_MULTIPLIER,默认值为20秒
export OSW_PS_SAMPLE_MULTIPLIER=3
指定归档变量OSWBB_ARCHIVE_DEST
export OSWBB_ARCHIVE_DEST=/tmp/archive
OS Watcher User's Guide (Doc ID 1531223.1)
2、分析oswbb
java -jar oswbba.jar -i /tmp/archive/
java -jar oswbba.jar -i /tmp/archive -EXA
OSWatcher Analyzer User Guide (Doc ID 461053.1)
3、tfa 启动
Linux and Solaris: /etc/init.d/init.tfa
Aix: /etc/init.tfa
HP-UX: /sbin/init.d/init.tfa
检查状态等
tfactl diagcollect -all -from "2020-09-09 22:00:00" -to "2020-09-10 00:10:00"
tfactl diagcollect -database qdtais
tfactl print status
tfactl print config
查看那个用户有访问权限
[root@ht01 ~]# /u01/app/grid/bin/tfactl access lsusers
WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.
.---------------------------------.
| TFA Users in ht01 |
+-----------+-----------+---------+
| User Name | User Type | Status |
+-----------+-----------+---------+
| grid | USER | Allowed |
'-----------+-----------+---------'
.---------------------------------.
| TFA Users in ht02 |
+-----------+-----------+---------+
| User Name | User Type | Status |
+-----------+-----------+---------+
| grid | USER | Allowed |
'-----------+-----------+---------'
tfa启动osw
tfactl stop oswbb
tfactl start oswbb
one commard sdrcs
tfactl diagcollect -srdc ORA-04031
tfactl diagcollect -srdc dbdataguard
具体参考 TFA Collector- The Preferred Tool for Automatic or ADHOC Diagnostic Gathering Across All Cluster Nodes [ID 1513912.2]
同步2节点 tfactl syncnodes
How to Manually syncnodes in TFA when "tfactl syncnodes" fails (Doc ID 2257890.1)