How to fix Metric Collection Errors in OEM 11g running on OEL-5/RHEL-5

本文详细介绍了如何解决Oracle Enterprise Manager 11g在OEL-5或RHEL-5上运行时遇到的Metric Collection错误问题,包括修改POSIX相关命令、更新代码中单位名称和重启OEM等步骤。
How to fix Metric Collection Errors in OEM 11g running on OEL-5/RHEL-5
2010-01-22 02:08
This report applies to the Oracle Enterprise Manager 11g Database Control installed as a part of the 11g database installation on OEL-5 or RHEL-5. The 11g "Release Notes for Linux" document states:

"If Oracle Enterprise Manager Database Control is running on Oracle Enterprise Linux 5 or Red Hat Enterprise Linux 5, Metric Collection Error is displayed for the CPU Usage metric. Due to this issue, the CPU usage information for the host is not displayed. Therefore, you cannot set alert threshold on the host CPU usage. This issue is tracked with Oracle bug 6316367."

Really, when we click the Host link in General section of OEM to go to the Host Home page, we can see:

1. Metric Collection Errors for the CPU Usage metric:
"tail: cannot open `+2' for reading: No such file or directory grep: write error: Broken pipe Failed to

run grep at /opt/oracle/product/11.1.0/db_1/sysman/admin/scripts/osCpuUsage.pl line 51."
and, going to the Configuration Page, we can see

2. Hardware Collection Warnings:
"/usr/bin/tail: cannot open `+2' for reading: No such file or directory /bin/df -lk -x tmpfs -x none |

/usr/bin/tail +2 | /bin/sort -u failed. FREQUENCY_IN_MHZ <PERR- is not numeric. FREQUENCY_IN_MHZ <PERR- is

not numeric. FREQUENCY_IN_MHZ <PERR- is not numeric. FREQUENCY_IN_MHZ <PERR- is not numeric. FREQUENCY_IN_MHZ

<PERR- is not numeric. FREQUENCY_IN_MHZ <PERR- is not numeric. FREQUENCY_IN_MHZ <PERR- is not numeric.

FREQUENCY_IN_MHZ <PERR- is not numeric. FREQUENCY_IN_MHZ <PERR- is not numeric. FREQUENCY_IN_MHZ <PERR- is

not numeric. FREQUENCY_IN_MHZ <PERR- is not numeric. FREQUENCY_IN_MHZ <PERR- is not numeric. FREQUENCY_IN_MHZ

<PERR- is not numeric.
and many of Hardware Details are not displayed.

Fortunatelly, both problems can be easily fixed.

1. There is a posix issue in OEL-5 and RHEL-5 regarding `tail' command. For example, insted of "tail +2", "tail +3" etc, that don't work anymore, we must write "tail -n +2", "tail -n +3" etc. Go to ${ORACLE_HOME}/sysman/admin/scripts directory and find out any files containing "tail +" command, eg:

# grep "tail +" * | less
My result is 8 files. So, change all occurrences of "tail +" to "tail -n +" in the following files:

allprocs.sh

emdprocstats.pl

executestack.pl

ifconfig.sh

osCpuUsage.pl

pmapinfo.ksh

swapList.sh

topprocs.sh
Also, change all occurrences of "TAIL +" to "TAIL -n +" in the following files:

Ptdpm0.pm

hostGenFunctions.pm

2. In file

Ptdpm1.pm
in line 428:

@iodat1    = split ("Mhz", $iobuf$n + 2);
change "Mhz" to "MHz". Namely, in OEL-5/RHEL-5 the output of "/sbin/lspci -vv" command is in "MHz", not in "Mhz", so that the agent cannot grab "Mhz" anymore.

3. Restart OEM

N.J.
 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值