Prayer

在一般中寻求卓越
posts - 1256, comments - 190, trackbacks - 0, articles - 0
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

db2diag

Posted on 2010-01-27 15:59 Prayer 阅读(576) 评论(0)  编辑 收藏 引用 所属分类: DB2

db2diag –help 查看命令的帮助。

2009-11-04-15.48.43.143136+480 I6355A414          LEVEL: Event
PID     : 176316               TID  : 258         PROC : db2sysc 2
INSTANCE: db2inst1             NODE : 002
EDUID   : 258                  EDUNAME: db2sysc 2
FUNCTION: DB2 UDB, fast comm manager, sqlkf_init_allocate_shared, probe:500
START   : FCM infrastructure started
FCM running in shared mode; FCM parallelism degree: 1; comm protocol: TCP/IPv4

  • -pid              - find all records for a list of process IDs
  • -tid              - find all records for a list of thread IDs
  • -eduid            - find all records for a list of EDU IDs
  • -node   , -n      - find all records for a list of nodes
  • -error  , -e      - find all records for a list of errors
  • -level  , -l      - find all records for a list of severity levels

db2diag is a tool for filtering and formatting the db2diag.log file

Authorization: None

Command syntax:
                  .------------.  .--------------.
                  V            |  V              |
     >>--db2diag--+------------+--+--------------+--><
                   |          |    |            |
                    --option--      --filename--

Command parameters:

-filter <fieldPatternList> or -g <fieldPatternList>

db2diag工具的-g选项可以对每一个列标志进行搜索,我的理解g就是unix中grep的缩写。

  • -g: 搜索符合搜索一系列“<列标志>=<列值>”条件的诊断日志记录,条件中间使用逗号分开。搜索区分大小写。
  • -gi: 功能等同于-g,搜索不区分大小写。
  • -gv: 搜索不符合一系列“<列标志>=<列值>”条件的诊断日志记录,条件中间使用逗号分开。搜索区分大小写。
  • -gvi:功能等同于-gv,搜索不区分大小写。

另外我们的条件表达式支持如下几种:

= 全字精确匹配查询
:= 部分匹配模糊查询
!= 查找不符合全字精确匹配查询条件的记录
!:= 查找不符合部分匹配模糊查询条件的记录
^= 选择查找列中以后面的查找条件开头的记录
!^= 选择查找列中不以后面的查找条件开头的记录

- To display all severe error messages produced by the process with the process ID (PID) 952356, enter:

       db2diag -g level=Severe,pid=952356

- To display all severe error messages produced by the process with the process ID (PID) 952356 and on node 1, 2 or 3, enter: 

       db2diag -g level=Severe,pid=952356 -n 1,2,3

- To display all messages logged after the one with time stamp  2003-03-03-12.16.26.230520 inclusively, enter:

       db2diag -time 2003-03-03-12.16.26.230520

- To display severe errors logged for the last 3 days, enter:

       db2diag -gi "level=severe" -H 3d


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理