前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >小知识:如何修改TFA下的OSW数据保留时间

小知识:如何修改TFA下的OSW数据保留时间

作者头像
Alfred Zhao
发布2020-07-01 10:40:53
1K0
发布2020-07-01 10:40:53
举报

How to change oswatcher retention when running under TFA 但很遗憾该问题目前也没有给出确切答复。

其实提问者已经给出了修改方法: tfactl stop oswbb tfactl start oswbb 15 168

只是不确认这样的修改在下次主机重启后是否还生效?下面来验证一下:

首先,默认的osw采集间隔是30s,保存时间为48h:

代码语言:javascript
复制
[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

代码语言:javascript
复制
[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

下面我们将主机重启,验证是否重启后还生效:

代码语言:javascript
复制
[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信息如下:

代码语言:javascript
复制
[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不加参数,发现已经是之前改过的配置:

代码语言:javascript
复制
[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没有自启动,需要手工启动。

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档