Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use diagcollection.pl script to package and collect diagnostic log files in RAC

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces RAC how to use diagcollection.pl script package to collect diagnostic log files, the article is very detailed, has a certain reference value, interested friends must read!

The diagcollection.pl script is available in the Oracle cluster environment under the "$ORA_CRS_HOME/bin" directory and can be executed as root to gather the necessary diagnostic information.

1. Set the necessary environment variables

Because the script needs to be executed as root, environment variables under oracle are invalid here and need to be reset.

[root@rac1 ~]# export ORACLE_BASE=/oracle/app/oracle

[root@rac1 ~]# export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

[root@rac1 ~]# export ORA_CRS_HOME=/oracle/app/crs

2. Ensure correctness of environment variables

Environment variables to check are: ORACLE_BASE, ORACLE_HOME, ORA_CRS_HOME, and HOSTNAME.

[root@rac1 ~]# echo $ORACLE_BASE

/oracle/app/oracle

[root@rac1 ~]# echo $ORACLE_HOME

/oracle/app/oracle/product/10.2.0/db_1

[root@rac1 ~]# echo $ORA_CRS_HOME

/oracle/app/crs

[root@rac1 ~]# echo $HOSTNAME

rac1

Environment variable check passed.

3. Execute the collection script diagcollection.pl

[root@rac1 ~]# cd $ORA_CRS_HOME/bin

[root@rac1 bin]# ./ diagcollection.pl --collect --all --crshome $ORA_CRS_HOME

Production Copyright 2004, 2005, Oracle. All rights reserved

Cluster Ready Services (CRS) diagnostic collection tool

The following CRS diagnostic archives will be created in the local directory.

crsData_rac1.tar.gz -> logs,traces and cores from CRS home. Note: core files will be packaged only with the -core option.

ocrData_rac1.tar.gz -> ocrdump, ocrcheck etc

coreData_rac1.tar.gz -> contents of CRS core files in text format

Collecting crs data

/bin/tar: Removing leading `/' from member names

Collecting OCR data

Collecting information from core files

No corefiles found

The following Oracle Home diagnostic archives will be created in the local directory.

oraData_rac1.tar.gz -> logs, traces and cores from Oracle Home

Collecting oracle home data

/bin/tar: Removing leading `/' from member names

The package files generated this time are as follows:

[root@rac1 bin]# ls -l *tar.gz

-rw-r--r-- 1 root root 138 Nov 18 22:38 coreData_rac1.tar.gz

-rw-r--r-- 1 root root 234507 Nov 18 22:38 crsData_rac1.tar.gz

-rw-r--r-- 1 root root 8000 Nov 18 22:38 ocrData_rac1.tar.gz

-rw-r--r-- 1 root root 81851 Nov 18 22:38 oraData_rac1.tar.gz

4. Help information for diagcollection.pl script

The diagcollection.pl script without any arguments gives help with how to use the script.

[root@rac1 bin]# ./ diagcollection.pl

Production Copyright 2004, 2005, Oracle. All rights reserved

Cluster Ready Services (CRS) diagnostic collection tool

diagcollection

--collect

[--crs] For collecting crs diag information

[--oh] For collecting oracle home diag information

[--all] Default.For collecting all diag information.

[--core] UNIX only. Does not package core files.

[--afterdate] UNIX only. Collects archives from the specified date. Specify in mm/dd/yyyy format

[--crshome] Argument that specifies the CRS Home location

NOTE:

1. You can also do the following

./ diagcollection.pl --collect --crs --oh

2. ORACLE_HOME env variable needs to be set.

--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

5. summary

The Diagcollection.pl script provided by Oracle makes it easy to package diagnostic information in bulk. Simplifies the complicated process of collecting fault information.

If diagnostic information needs to be submitted to Oracle technical support personnel, it is more efficient to use this method.

Good luck.

secooler

10.11.18

The above is "RAC how to use diagcollection.pl script package collection diagnostic log file" all the content of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report