Script To Col OPatch Diagnostic Information For Unix Platform

本文提供了一个名为opatchdiag.sh的脚本,用于在Unix平台上友好地诊断opatch相关问题。该脚本会创建一个名为opatch_diag_<oraclehomename>_timestamp.zip的输出文件。为了运行此脚本,需要在Unix命令提示符下执行,并且具备一些基本的Unix命令如uname、ls、zip、find、awk等。此外,还需要shell环境来运行shell脚本。

Script To Col OPatch Diagnostic Information For Unix Platform (opatchdiag.sh) (Doc ID 1430571.1)

APPLIES TO:

Oracle Universal Installer - Version 1.0.0.0.59 to 11.2.0.3
Other UNIX

PURPOSE

This script is intended to provide a user friendly output to diagnose the opatch related issue . The script will create a output file called opatch_diag_<oraclehomename>_<timestamp>.zip.

REQUIREMENTS

The script needs to be run on command prompt of Unix platform .
Basic unix command are required to gather the information like uname , ls ,zip ,find, awk..etc
Shell is required to run the shell script .

CONFIGURING

Download and save the script on your server as opatchdiag.sh
Provide the execute permission on the script

INSTRUCTIONS

 Run the script from the location where you have downloaded and saved it

./opatchdiag.sh

 

CAUTION

This sample code is provided for educational purposes only, and is not supported by Oracle Support. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.

SCRIPT

Execute the script on the Oracle home where you have faced the opatch issue and provide the resultant log files to Oracle Support for analysis purposes.

Steps to execute diag script

 1. Download the script from here
 2. Log in as "oracle" user
 3. copy the file to a location say /home/oracle/scripts
 4. Give execute permission

    chmod 755 opatchdiag.sh


 5. Set ORACLE_HOME, ORACLE_BASE, if not set, you will be prompted to enter these details
 6. Execute the script

  $ cd /home/oracle/scripts
  $ ./opatchdiag.sh


 7. You will be prompted for the following details


Enter Oracle Base path :  /u01/app/oracle  (If not set before executing the script)

Enter Oracle home path :  /u03/app/oracle/OraHome_11202g (If not set before executing the script)

Do you have md5sum utility installed on your system [Y/N] :  y   (if it is not found in PATH)

Please enter the path along with filename of md5sum command :  /usr/bin/md5sum

Enter the filename of the patch downloaded along with path <path to patch>/<filename.zip>
/home/oracle/p9829397_112020_Linux-x86-64.zip              [Example say if you are installing patch 9829397 
                                                                                                 on Linux 64 bit ]
Enter the patch id details which is scheduled to be installed
Patch ID :  9829397                                                                 [Enter 9829397 ]


 8. Output is spooled under directory /tmp/opatchdiag
 9. At the end of execution you will be shown the .zip file to be uploaded into the SR
10. After uploading the .zip file, clean up /tmp/opatchdiag directory

SAMPLE OUTPUT

*** Start of LogFile ***

Opatch Diagnostic Utility < Time Stamp>

Sample output (opatchdiag_24_02_12_04_38_10.log)

================================================

Diagnostic data for OPatch Utility

============================
System Details
============================
OS Platform : Linux
Kernel Ver : 2.6.9-55.ELsmp
Hardware : i386
Hostname : hostname.domainname 

============================
ULIMIT Details
============================
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 16384
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

============================
OS release Details
============================
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)

============================
Opatch Version
============================
OPatch Version: 11.2.0.1.6


============================
oraInst.loc
============================
inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall

============================
ORACLE_HOME & BASE
============================
ORACLE_BASE = /u01/app/oracle
ORACLE_HOME = /u03/app/oracle/OraHome_11202g
Oracle Base Owned by : oracle : oinstall
Oracle Home Owned by : oracle : oinstall
Not able to find ARU ID in oraclehomeproperties.xml, check the file manually
Not able to find ARU_ID_DESCRIPTION in oraclehomeproperties.xml, check the file manually


============================
env output
============================
G_BROKEN_FILENAMES=1
HISTSIZE=1000
HOME=/home/oracle
HOSTNAME=hostname.domainname
INPUTRC=/etc/inputrc
KDEDIR=/usr
LANG=en_US.UTF-8
LESSOPEN=|/usr/bin/lesspipe.sh %s
LOGNAME=oracle
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL=/var/spool/mail/oracle
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u03/app/oracle/OraHome_11202g
ORACLE_SID=orcl1122
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/home/oracle/bin:/u03/app/oracle/OraHome_11202g/bin
PWD=/home/oracle/script
SHELL=/bin/bash
SHLVL=2
SSH_TTY=/dev/pts/3
TERM=xterm
USER=oracle
_=/usr/bin/env


============================
Inventory file is owned by
============================
Username = oracle
Group = oinstall
Permission = -rw-rw----

============================
Current OS USER
============================
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)

============================
Java version
============================
OH Java version : java version "1.5.0_24-rev" Java(TM) Platform, Standard Edition for Business (build 1.5.0_24-rev-b08) Java HotSpot(TM) Client VM (build 1.5.0_24-rev-b08, mixed mode)

OS Java not found in PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/home/oracle/bin:/u03/app/oracle/OraHome_11202g/bin
JAVA_HOME env variable not set

============================
Oracle binary BIT details
============================
/u03/app/oracle/OraHome_11202g/bin/oracle: setuid setgid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped


============================
9829397 details
============================
MD5SUM : 229f21bf14e96eedc390c94e6df53984 /home/oracle/p9829397_112020_Linux-x86-64.zip
/home/oracle/p9829397_112020_Linux-x86-64.zip listing
-rw-r--r-- 1 oracle oinstall 439410 Aug 12 2011 /home/oracle/p9829397_112020_Linux-x86-64.zip

============================
Integrity of Inventory
============================
Local Inventory

/u03/app/oracle/OraHome_11202g/inventory/ContentsXML/comps.xml Integrity check passed...
File not found /u03/app/oracle/OraHome_11202g/inventory/ContentsXML/inventory.xml...

Central Inventory

/u01/app/oracle/oraInventory/ContentsXML/inventory.xml integrity check passed...
/u01/app/oracle/oraInventory/ContentsXML/comps.xml integrity check passed...

================================================================

Change History

Script modified and uploaded on 12-Mar-2015
fj.pngopatchdiag.rar

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26701168/viewspace-1785094/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26701168/viewspace-1785094/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值