diagcollection.pl命令實踐過程
1.定位命令
=====================================
[root@node1 ~]# which diagcollection.pl
/u01/app/11.2.0/grid/bin/diagcollection.pl
[root@node1 ~]# ls -lrt /u01/app/11.2.0/grid/bin/diagcollection.pl
-rwxr-xr-x 1 grid oinstall 34144 Apr 7 2009 /u01/app/11.2.0/grid/bin/diagcollection.pl
2.找出變數
==================================================
------------------grid-----------
[grid@node1 ~]$ env|grep ORA
ORACLE_SID=+ASM1
ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/11.2.0/grid
[grid@node1 ~]$
------------------oracle-----------
[oracle@node1 ~]$ env|grep ORA
ORACLE_UNQNAME=racdb
ORACLE_OWNER=oracle
ORACLE_SID=racdb1
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
===========================================================
3.root設定變數
---------root----------
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export ORA_CRS_HOME=/u01/app/11.2.0/grid
4.root呼叫
root:
[root@node1 wyq]# pwd
/root/wyq
/u01/app/11.2.0/grid/bin/diagcollection.pl --collect --all --crshome $ORA_CRS_HOME
--------------呼叫過程---------
[root@node1 wyq]# /u01/app/11.2.0/grid/bin/diagcollection.pl --collect --all --crshome $ORA_CRS_HOME
Production Copyright 2004, 2008, 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_20150522_1929.tar.gz -> logs,traces and cores from CRS home. Note: core files will be packaged only with the --core option.
ocrData_node1_20150522_1929.tar.gz -> ocrdump, ocrcheck etc
coreData_node1_20150522_1929.tar.gz -> contents of CRS core files in text format
osData_node1_20150522_1929.tar.gz -> logs from Operating System
Collecting crs data
/bin/tar: log/node1/agent/ohasd/oraagent_grid/oraagent_grid.log: file changed as we read it
/bin/tar: log/node1/cssd/ocssd.log: file changed as we read it
Collecting OCR data
Collecting information from core files
No corefiles found
Collecting OS logs
----------------
[root@node1 wyq]#
5.結果 存 當前目錄,檔名中日期+時間
[root@node1 wyq]# pwd
/root/wyq
[root@node1 wyq]# ls -lrt
total 20012
-rw-r--r-- 1 root root 20145534 May 22 19:30 crsData_node1_20150522_1929.tar.gz
-rw-r--r-- 1 root root 9807 May 22 19:31 ocrData_node1_20150522_1929.tar.gz
-rw-r--r-- 1 root root 299056 May 22 19:31 osData_node1_20150522_1929.tar.gz
[root@node1 wyq]#
[root@node1 wyq]# date
Fri May 22 19:51:47 CST 2015
[root@node1 wyq]#
6、幫助 diagcollection.pl
[root@node1 ~]# /u01/app/11.2.0/grid/bin/diagcollection.pl
Production Copyright 2004, 2008, Oracle. All rights reserved
Cluster Ready Services (CRS) diagnostic collection tool
diagcollection
--collect
[--crs] For collecting crs diag information
[--adr] For collecting diag information for ADR
[--ipd] For collecting IPD-OS data
[--all] Default.For collecting all diag 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 IPD data from the specified time. Specify in MM/DD/YYY24HH:MM:SS format
If not specified, IPD data generated in the past 24 hours are collected
[--incidentduration] Collects IPD data for the duration after the specified time. Specify in HH:MM format.
If not specified, all IPD data after incidenttime are collected
NOTE:
1. You can also do the following
./diagcollection.pl --collect --crs --crshome
--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
[root@node1 ~]#
=====================================
[root@node1 ~]# which diagcollection.pl
/u01/app/11.2.0/grid/bin/diagcollection.pl
[root@node1 ~]# ls -lrt /u01/app/11.2.0/grid/bin/diagcollection.pl
-rwxr-xr-x 1 grid oinstall 34144 Apr 7 2009 /u01/app/11.2.0/grid/bin/diagcollection.pl
2.找出變數
==================================================
------------------grid-----------
[grid@node1 ~]$ env|grep ORA
ORACLE_SID=+ASM1
ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/11.2.0/grid
[grid@node1 ~]$
------------------oracle-----------
[oracle@node1 ~]$ env|grep ORA
ORACLE_UNQNAME=racdb
ORACLE_OWNER=oracle
ORACLE_SID=racdb1
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
===========================================================
3.root設定變數
---------root----------
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export ORA_CRS_HOME=/u01/app/11.2.0/grid
4.root呼叫
root:
[root@node1 wyq]# pwd
/root/wyq
/u01/app/11.2.0/grid/bin/diagcollection.pl --collect --all --crshome $ORA_CRS_HOME
--------------呼叫過程---------
[root@node1 wyq]# /u01/app/11.2.0/grid/bin/diagcollection.pl --collect --all --crshome $ORA_CRS_HOME
Production Copyright 2004, 2008, 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_20150522_1929.tar.gz -> logs,traces and cores from CRS home. Note: core files will be packaged only with the --core option.
ocrData_node1_20150522_1929.tar.gz -> ocrdump, ocrcheck etc
coreData_node1_20150522_1929.tar.gz -> contents of CRS core files in text format
osData_node1_20150522_1929.tar.gz -> logs from Operating System
Collecting crs data
/bin/tar: log/node1/agent/ohasd/oraagent_grid/oraagent_grid.log: file changed as we read it
/bin/tar: log/node1/cssd/ocssd.log: file changed as we read it
Collecting OCR data
Collecting information from core files
No corefiles found
Collecting OS logs
----------------
[root@node1 wyq]#
5.結果 存 當前目錄,檔名中日期+時間
[root@node1 wyq]# pwd
/root/wyq
[root@node1 wyq]# ls -lrt
total 20012
-rw-r--r-- 1 root root 20145534 May 22 19:30 crsData_node1_20150522_1929.tar.gz
-rw-r--r-- 1 root root 9807 May 22 19:31 ocrData_node1_20150522_1929.tar.gz
-rw-r--r-- 1 root root 299056 May 22 19:31 osData_node1_20150522_1929.tar.gz
[root@node1 wyq]#
[root@node1 wyq]# date
Fri May 22 19:51:47 CST 2015
[root@node1 wyq]#
6、幫助 diagcollection.pl
[root@node1 ~]# /u01/app/11.2.0/grid/bin/diagcollection.pl
Production Copyright 2004, 2008, Oracle. All rights reserved
Cluster Ready Services (CRS) diagnostic collection tool
diagcollection
--collect
[--crs] For collecting crs diag information
[--adr] For collecting diag information for ADR
[--ipd] For collecting IPD-OS data
[--all] Default.For collecting all diag 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 IPD data from the specified time. Specify in MM/DD/YYY24HH:MM:SS format
If not specified, IPD data generated in the past 24 hours are collected
[--incidentduration] Collects IPD data for the duration after the specified time. Specify in HH:MM format.
If not specified, all IPD data after incidenttime are collected
NOTE:
1. You can also do the following
./diagcollection.pl --collect --crs --crshome
--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
[root@node1 ~]#
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8494287/viewspace-1675520/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 用typescript開發爬蟲過程實踐TypeScript爬蟲
- puppeteer在開發過程中的實踐
- Oracle儲存過程優化小實踐Oracle儲存過程優化
- 0.去O過程實踐筆記-前言筆記
- mysql儲存過程及日期函式實踐MySql儲存過程函式
- Vue 實踐過程中的幾個問題Vue
- 深入理解 HTTPS 原理、過程與實踐HTTP
- 敏捷建模對統一過程的改造實踐敏捷
- Uber永久定位系統實時資料分析過程實踐!
- Vi命令實踐
- RAG-GPT實踐過程中遇到的挑戰GPT
- 實戰儲存過程排程過程儲存過程
- 課程實踐(二)
- 課程實踐(一)
- Android群英傳實踐過程參考文章薈萃Android
- [全程建模]全程建模實踐過程指南(2004年)
- Redis 命令的執行過程Redis
- Linux命令實踐Linux
- Redis核心原理與實踐--Redis啟動過程原始碼分析Redis原始碼
- 同行程式碼評審過程中的實踐經驗行程
- 課程實踐(二)續
- 課程實踐(一)續
- 【原始碼】Redis命令處理過程原始碼Redis
- 中興通訊測試專案實踐:敏捷測試特性文件的交付過程實踐探討敏捷測試
- Docker 實踐及命令梳理Docker
- Shell常見命令實踐
- [轉]UNIX find命令實踐
- .NET Core中使用Dapper操作Oracle儲存過程最佳實踐APPOracle儲存過程
- Nginx部署HTTPS服務過程與異常處理實踐NginxHTTP
- 規範軟體開發過程——軟體配置管理實踐
- promise實現過程Promise
- innobackupex命令備份全過程圖解圖解
- 實踐JavaWeb課程專案JavaWeb
- 課程實踐(一)續1
- PHP 協程實現過程詳解PHP
- 開源實踐 | 攜程在OceanBase的探索與實踐
- 開源實踐 | 攜程在 OceanBase 的探索與實踐
- 專案實施過程