• 小知识:如何修改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没有自启动,需要手工启动。

    AlfredZhao©版权所有「从Oracle起航,领略精彩的IT技术。」
  • 相关阅读:
    Codeforces Round #358 (Div. 2)
    Codeforces Round #357 (Div. 2)
    Codeforces Round #356 (Div. 2)
    第11章例题(紫书)
    第10章例题(紫书)
    Codeforces Round #354 (Div. 2)
    2016百度之星
    BestCoder 1st Anniversary
    BestCoder Round #41
    BestCoder Round #40
  • 原文地址:https://www.cnblogs.com/jyzhao/p/13211677.html
Copyright © 2020-2023  润新知