zoukankan      html  css  js  c++  java
  • 小知识:如何修改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技术。」
  • 相关阅读:
    复杂json对应的实体类定义
    Hbase 根据rowkey批量读写
    Spark 分组聚合转Map 的方式
    idea本地连接访问hadoop集群的方法
    新版supperset连接druid数据源设置
    使用jdbc java 连接 sqlserver 2008数据库 需要注意的事项
    关于CrystalQuartz设置Cron匹配的时区问题~
    VS2010连接远程TFS2012项目问题
    关于ASP.NET SignalR的Group使用
    关于CodeFrist下EntityFramework5.0及其最新版本中枚举的使用
  • 原文地址:https://www.cnblogs.com/jyzhao/p/13211677.html
Copyright © 2011-2022 走看看