小知識:如何修改TFA下的OSW數據保留時間


在Oracle社區可以搜索到這樣的問題:
How to change oswatcher retention when running under TFA
但很遺憾該問題目前也沒有給出確切答復。

其實提問者已經給出了修改方法:
tfactl stop oswbb
tfactl start oswbb 15 168

只是不確認這樣的修改在下次主機重啟后是否還生效?下面來驗證一下:

首先,默認的osw采集間隔是30s,保存時間為48h:

[grid@db01 ~]$ ps -ef|grep osw
grid      8378     1  0 Jun27 ?        00:01:11 /bin/sh ./OSWatcher.sh 30 48 NONE /opt/app/grid/oracle.ahf/data/repository/suptools/db01/oswbb/grid/archive
grid      8961  8378  0 Jun27 ?        00:00:27 /bin/sh ./OSWatcherFM.sh 48 /opt/app/grid/oracle.ahf/data/repository/suptools/db01/oswbb/grid/archive
grid     11868 11846  0 23:34 pts/0    00:00:00 grep --color=auto osw

我們將其修改為采集間隔15s,保存時間為168h(也就是7天):
tfactl stop oswbb
tfactl start oswbb 15 168

[grid@db01 ~]$ tfactl stop oswbb
Stopped OSWatcher
[grid@db01 ~]$ tfactl start oswbb 15 168
Starting OSWatcher
[grid@db01 ~]$ ps -ef|grep osw
grid     12123     1  0 23:34 pts/0    00:00:00 /bin/sh ./OSWatcher.sh 15 168 NONE /opt/app/grid/oracle.ahf/data/repository/suptools/db01/oswbb/grid/archive
grid     12152 11846  0 23:34 pts/0    00:00:00 grep --color=auto osw
[grid@db01 ~]$ ps -ef|grep osw
grid     12123     1  0 23:34 pts/0    00:00:00 /bin/sh ./OSWatcher.sh 15 168 NONE /opt/app/grid/oracle.ahf/data/repository/suptools/db01/oswbb/grid/archive
grid     12241 12123  0 23:34 pts/0    00:00:00 /bin/sh ./OSWatcherFM.sh 168 /opt/app/grid/oracle.ahf/data/repository/suptools/db01/oswbb/grid/archive
grid     12346 11846  0 23:34 pts/0    00:00:00 grep --color=auto osw

下面我們將主機重啟,驗證是否重啟后還生效:

[root@db01 ~]# reboot
[grid@db01 ~]$ uptime
 23:47:45 up 9 min,  1 user,  load average: 0.45, 0.86, 0.69
[grid@db01 ~]$ ps -ef|grep osw
grid      5976  5940  0 23:47 pts/0    00:00:00 grep --color=auto osw

遺憾的看到,重啟后osw壓根兒都沒有自啟動,更別提保留什么配置了..
查詢下tfactl toolstatus信息如下:

[grid@db01 ~]$ tfactl toolstatus

.------------------------------------------------------------------.
|                    TOOLS STATUS - HOST : db01                    |
+----------------------+--------------+--------------+-------------+
| Tool Type            | Tool         | Version      | Status      |
+----------------------+--------------+--------------+-------------+
| Development Tools    | orachk       |   19.3.0.0.0 | DEPLOYED    |
|                      | oratop       |       14.1.2 | DEPLOYED    |
+----------------------+--------------+--------------+-------------+
| Support Tools Bundle | darda        | 2.10.0.R6036 | DEPLOYED    |
|                      | oswbb        |        8.3.2 | NOT RUNNING |
|                      | prw          | 12.1.13.11.4 | NOT RUNNING |
+----------------------+--------------+--------------+-------------+
| TFA Utilities        | alertsummary |   19.3.0.0.0 | DEPLOYED    |
|                      | calog        |   19.3.0.0.0 | DEPLOYED    |
|                      | dbcheck      |   18.3.0.0.0 | DEPLOYED    |
|                      | dbglevel     |   19.3.0.0.0 | DEPLOYED    |
|                      | grep         |   19.3.0.0.0 | DEPLOYED    |
|                      | history      |   19.3.0.0.0 | DEPLOYED    |
|                      | ls           |   19.3.0.0.0 | DEPLOYED    |
|                      | managelogs   |   19.3.0.0.0 | DEPLOYED    |
|                      | menu         |   19.3.0.0.0 | DEPLOYED    |
|                      | param        |   19.3.0.0.0 | DEPLOYED    |
|                      | ps           |   19.3.0.0.0 | DEPLOYED    |
|                      | pstack       |   19.3.0.0.0 | DEPLOYED    |
|                      | summary      |   19.3.0.0.0 | DEPLOYED    |
|                      | tail         |   19.3.0.0.0 | DEPLOYED    |
|                      | triage       |   19.3.0.0.0 | DEPLOYED    |
|                      | vi           |   19.3.0.0.0 | DEPLOYED    |
'----------------------+--------------+--------------+-------------'

Note :-
  DEPLOYED    : Installed and Available - To be configured or run interactively.
  NOT RUNNING : Configured and Available - Currently turned off interactively.
  RUNNING     : Configured and Available.

[grid@db01 ~]$ 

發現其中oswbb狀態是“NOT RUNNING”,手工啟動oswbb不加參數,發現已經是之前改過的配置:

[grid@db01 ~]$ tfactl start oswbb
Starting OSWatcher
[grid@db01 ~]$ ps -ef|grep osw
grid      8671     1  0 00:07 pts/0    00:00:00 /bin/sh ./OSWatcher.sh 15 168 NONE /opt/app/grid/oracle.ahf/data/repository/suptools/db01/oswbb/grid/archive
grid      8700  5940  0 00:07 pts/0    00:00:00 grep --color=auto osw

看來重啟配置雖然不會丟失,但是oswbb沒有自啟動,需要手工啟動。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM