Chinaunix首页 | 论坛 | 博客
  • 博客访问: 286273
  • 博文数量: 29
  • 博客积分: 2200
  • 博客等级: 大尉
  • 技术积分: 305
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-29 00:05
文章分类

全部博文(29)

文章存档

2018年(1)

2014年(2)

2012年(4)

2011年(5)

2009年(5)

2008年(1)

2007年(3)

2006年(8)

我的朋友

分类:

2006-10-24 09:27:20

db2日常监控(二)--db2support工具

                             by paolo.wang

 

db2support是为了简化数据库服务器信息收集而出现的一个实用工具。该实用程序会自动确定 IBM Service 需要什么诊断信息,然后收集这些信息,并将信息打包到一个 zip 文件中。该文件包含的范围有:硬件信息(cpu,存储,网络等)、操作系统信息、数据库服务器信息以及数据结构,控制文件、数据库诊断文件等。收集成功后,只需要把db2support.zip文件(默认名字,可以更改)解压,在同名目录下生成.html文件,然后通过浏览器查看收集到的详细信息。

 

db2support工具本身执行比较简单,参数选项不是很多,输出结果区别也不是很大,主要就是综合收集系统,数据库的各方面信息。例如:

***************************************************************************

[db2inst1@test1 db2backup]$ db2support /home/db2inst1/db2backup/ -a -d db2test -c

 

 

 

              _______   D B 2  S u p p o r t   ______

 

This program generates information about a DB2 server, including

information about its configuration and system environment. The output of

this program will be stored in a file named 'db2support.zip', located

in the directory specified on the application command line. If you are

experiencing problems with DB2, it may help if this program is run

while the problem is occurring.

 

NOTES:

 

   1. By default, this program will not capture any user data from tables or

      logs to protect the security of your data.

 

   2. For best results, run this program using an ID having SYSADM authority.

 

   3. On Windows systems you should run this utility from a db2 command

      session.

 

   4. Data collected from this program will be from the machine where this

      program runs.  In a client-server environment, database-related

      information will be from the machine where the database resides via an

      instance attachment or connection to the database.

 

 

  Press key to continue.

 

 

Output file is "/home/db2inst1/db2backup/db2support.zip"

Time and date of this collection: "2006?0?4?09?3?2"

 

 

Collecting "System files"

     "db2inst1.nfy"

     "db2eventlog.000"

     "t6591.000"

     "DB2TSCHG.HIS"

     "SQLBP.1"

     "db2rhist.asc"

     "SQLSPCS.2"

     "SQLDBCON"

     "SQLOGCTL.LFH"

     "SQLBP.2"

     "SQLSPCS.1"

     "db2systm"

     "db2cli.ini"

     "sqldbbak"

     "sqldbdir"

     "sqldbins"

     "report.log"

 

Collecting "Basic operating system and hardware information"

 

Collecting "System resource info (disk, CPU, memory)"

 

Collecting "Operating system and level"

java full version "gcj-1.4.2"

 

Collecting "JDK Level"

java full version "gcj-1.4.2"

 

Collecting "DB2 Release Info"

 

Collecting "DB2 install path info"

 

Collecting "Registry info"

 

Collecting "EEE node information"

 Collecting "Get dbm cfg"

 Collecting "Get admin cfg"

 Collecting "List database directory"

 

Collecting "Sqllib directory listing"

       SQL Code: "-1027"

 Collecting "List node directory"

       SQL Code: "-1027"

       SQL Code: "-1027"

 Collecting "List admin node directory"

       SQL Code: "-1027"

       SQL Code: "-1311"

 Collecting "List DCS directory"

       SQL Code: "-1311"

 Collecting "Get cli cfg"

 Collecting "List DCS applications extended"

 Collecting "Query client"

 Collecting "List active databases"

 Collecting "DB CFG for node 0"

 Collecting "List history since 20060924 for db db2test"

 Collecting "List datalinks managers for database db2test"

 Collecting "List applications for database db2test global show detail"

 

...attempting to connect to database: "db2test"

 

Collecting "Buffer pool information"

 

Collecting "Table space information"

 Collecting "List nodegroups show detail"

 Collecting "Get snapshot for all applications"

 Collecting "Select count(*) from sysibm.systables where type='T' and creator <> 'SYSIBM'"

 Collecting "Get snapshot for all databases global"

 Collecting "List packages for all"

 Collecting "List tables for all show detail"

 Collecting "List indoubt transactions"

       SQL Code: "-1462"

 Collecting "List DRDA indoubt transactions"

       SQL Code: "-1462"

 Collecting "List command options"

 Collecting "List nodes"

       SQL Code: "-1297"

 Collecting "List ODBC data sources"

       SQL Code: "-1297"

 

 

Creating final output archive

     "db2support.html"

     "db2_sqllib_directory.txt"

     "db2supp_system.zip"

     "dbm_detailed.supp_cfg"

     "db2test_node0_detailed_db.supp_cfg"

     "spcs_bp.supp_cfg"

     "db2test_node0_db.supp_cfg"

     "dbm.supp_cfg"

     "JDKlevel.supp_cfg"

     "ngrp.supp_cfg"

     "admin.supp_cfg"

     "cli.supp_cfg"

     "bp.supp_cfg"

     "db2test_list_hist.supp_out"

     "list_packages.supp_out"

     "db2level.supp_out"

     "list_DRDA_trans.supp_out"

     "dbmsnap.supp_out"

     "list_apps.supp_out"

     "ODBC_datasources.supp_out"

     "tbspc.supp_out"

     "db2set.supp_out"

     "list_cmd_opts.supp_out"

     "db2greg.supp_out"

     "list_transactions.supp_out"

     "query_client.supp_out"

     "db2test_dlfm.supp_out"

     "list_nodes.supp_out"

     "admin_nodedir.supp_out"

     "dbsnap.supp_out"

     "list_tables.supp_out"

     "dcs_dir.supp_out"

     "db_dir.supp_out"

     "nodedir.supp_out"

     "appsnap.supp_out"

     "active_db.supp_out"

     "dcsext.supp_out"

     "db2diag.log"

 

 

db2support is now complete.

 An archive file has been produced: "db2support.zip"

[db2inst1@test1 db2backup]$

*******************************************************************

在上是db2support的执行具体过程,执行后,会在当前目录下生成db2support.zip文件。也可以指定成生的zip文件名,和文件生成路径。

其它相关选项可以看帮助信息,执行db2support -h查看。

 

生成后,把zip文件解压,在同名目录下打开.html文件如下图1,2,3

1

 

2

 

3

 

以查看更多的详细信息来分析诊断数据库服务器。

 

需要注意的是,对于相对较大型的DB2数据库系统,该工具执行过程会占用较长时间和相对较大的资源,所以应该选择生产系统不繁忙的时间或维护时间来执行该作业。

 

以上只是对不了解此工具的朋友做个简单介绍,如有不正确的地方,请指正。

 

阅读(6698) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~