diagcollection.pl 的使用

os: centos 7.4
db: oracle 11.2.0.4

diagcollection.pl

diagcollection.pl 默认安装在 grid 用户的 $ORACLE_HOME/bin 下

# su - grid
Last login: Thu Feb  6 05:28:10 CST 2020 on pts/3
$ cd $ORACLE_HOME
$ pwd
/u01/app/grid/product/11.2.0/grid_1
$ cd bin
$ ls -l diag*
-rwxr-xr-x 1 root oinstall 44304 May 16  2013 diagcollection.pl
-rwxr-xr-x 1 root oinstall   529 Sep 30 12:17 diagcollection.sh
-rwxr-xr-x 1 grid oinstall  7580 Sep 30 10:57 diagsetup

初步使用

$ diagcollection.pl -h
Production Copyright 2004, 2010, Oracle.  All rights reserved
Cluster Ready Services (CRS) diagnostic collection tool
Error: current directory /u01/app/grid/product/11.2.0/grid_1/bin is not writable

猜测是 grid 的权限不够,使用 root 账号试试。

$ exit
logout
# cd /u01/app/grid/product/11.2.0/grid_1/bin
# ./diagcollection.pl -h
Production Copyright 2004, 2010, Oracle.  All rights reserved
Cluster Ready Services (CRS) diagnostic collection tool
diagcollection
    --collect  
             [--crs] For collecting crs diagnostic information 
             [--adr] For collecting diagnostic information for ADR; specify ADR location
             [--chmos] For collecting Cluster Health Monitor (OS) data
             [--acfs] Unix only. For collecting ACFS diagnostic information 
             [--all] Default.For collecting all diagnostic information. 
             [--core] UNIX only. Package core files with CRS data 
             [--afterdate] UNIX only. Collects archives from the specified date. Specify in mm/dd/yyyy format
             [--aftertime] Supported with -adr option. Collects archives after the specified time. Specify in YYYYMMDDHHMISS24 format
             [--beforetime] Supported with -adr option. Collects archives before the specified date. Specify in YYYYMMDDHHMISS24 format
             [--crshome] Argument that specifies the CRS Home location 
             [--incidenttime] Collects Cluster Health Monitor (OS) data from the specified time.  Specify in MM/DD/YYYYHH24:MM:SS format
                  If not specified, Cluster Health Monitor (OS) data generated in the past 24 hours are collected
             [--incidentduration] Collects Cluster Health Monitor (OS) data for the duration after the specified time.  Specify in HH:MM format.
                 If not specified, all Cluster Health Monitor (OS) data after incidenttime are collected 
             NOTE: 
             1. You can also do the following 
                ./diagcollection.pl --collect --crs --crshome <CRS Home>
 
     --clean        cleans up the diagnosability
                    information gathered by this script
 
     --coreanalyze  UNIX only. Extracts information from core files
                    and stores it in a text file
                    

收集 crs 相关的信息

# ./diagcollection.pl --collect --crs --crshome /u01/app/grid/product/11.2.0/grid_1/
Production Copyright 2004, 2010, Oracle.  All rights reserved
Cluster Ready Services (CRS) diagnostic collection tool
The following CRS diagnostic archives will be created in the local directory.
crsData_node1_20200206_0718.tar.gz -> logs,traces and cores from CRS home. Note: core files will be packaged only with the --core option. 
ocrData_node1_20200206_0718.tar.gz -> ocrdump, ocrcheck etc 
coreData_node1_20200206_0718.tar.gz -> contents of CRS core files in text format

osData_node1_20200206_0718.tar.gz -> logs from Operating System
lsInventory_node1_20200206_0718 ->Opatch lsinventory details
Collecting crs data
Collecting OCR data 
Collecting information from core files
No corefiles found 
Collecting lsinventory details
Collecting OS logs
Collecting sysconfig data

# ls -lt /u01/app/grid/product/11.2.0/grid_1/log
total 34356
-rw-r--r--  1 root root        27097 Feb  6 07:19 sysconfig_node1_20200206_0718.txt
-rw-r--r--  1 root root       264130 Feb  6 07:19 osData_node1_20200206_0718.tar.gz
-rw-r--r--  1 root root         1099 Feb  6 07:19 lsInventory_node1_20200206_0718
-rw-r--r--  1 root root        25522 Feb  6 07:19 ocrData_node1_20200206_0718.tar.gz
-rw-r--r--  1 root root     34849064 Feb  6 07:18 crsData_node1_20200206_0718.tar.gz
drwxrwx--T  5 grid asmadmin       71 Sep 30 13:59 diag
drwxr-xr-t 24 root oinstall      327 Sep 30 11:04 node1
drwxr-xr-x  2 grid oinstall        6 Sep 30 10:57 crs

参考:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

数据库人生

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值