Trafodion查看运行时任务——Offender

Offender是Trafodion数据库用于查看运行时执行Sql语句的工具。

 

以下介绍操作示例及详细用法。

首先登陆数据库安装服务器,切换到trafodion用户并且切换到工具所在目录:

# su - trafodion
$ cdw
$ cd export/limited-support-tools/LSO/

然后执行offender语句,最常用的offender命令如下:

$ ./offender -s active

输出结果示例:
[trafodion@esgzb-del-n005 LSO]$ ./offender -s active
EsgynDB Advanced Conversational Interface 2.4.1
Copyright (c) 2015-2018 Esgyn Corporation
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>+>+>+>+>+>+>+>+>+>+>+>
CURRENT_TIMESTAMP           LAST_ACTIVITY_SECS    QUERY_ID                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      EXECUTE_STATE                   SOURCE_TEXT
--------------------------  --------------------  ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  ------------------------------  ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

2018-07-17 21:55:26.717561                    -2  MXID11000000585212398595685787020000000000206U3333308T150000000_25___SQLCI_DML_LAST__                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         DEALLOCATED                     "select count(*) from CQGPRS20180612;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

--- 1 row(s) selected.
>>

End of MXCI Session

详细用法如下:

[trafodion@esgzb-del-n005 LSO]$ ./offender -h

    This script runs a Lightweight SQL Offender script
    syntax:  -s|--script <script-name> [-t|--time <time>] [-n|--node <node>] 
             [-m|--memsize] 
             [-h|--help]
 
    Either the short form (-x) or long form (--name) of the parameters can be 
           used

    -s|--script Manditory. <script-name> must be one of:
                          cpu_offender
                          mem_offender
                          wm_mem_offender
                          active
                          se_blocked
                          se_offender
                          inactive
                          in_sql
                          in_client
                          dead
                          unmonitored
                          in_compile

   -t|--time   Optional Default 30
               values: 0 < <time> < 32768 
               Time span (in seconds) to search for matching offenders.  
               Applies to scripts: dead,inactive,in_sql,in_client,unmonitored,in_compile

   -m|--memsize Optional Default 250
                Processes exceeding the given memory threshold in MB
                Applies to mem_offender and wm_mem_offender
 
   -n|--node   Optional Default ALL NODES
               values: -1 < <node> < 2048
               Restricts the query to the given SQL node number 
   
  -h|--help   Display this text and exit

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值