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:
2. Hardware Collection Warnings:
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:
2. In file
3. Restart OEM
N.J.
"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 +" * | lessMy 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.shAlso, change all occurrences of "TAIL +" to "TAIL -n +" in the following files:
Ptdpm0.pm hostGenFunctions.pm
2. In file
Ptdpm1.pmin 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.
本文详细介绍了如何解决Oracle Enterprise Manager 11g在OEL-5或RHEL-5上运行时遇到的Metric Collection错误问题,包括修改POSIX相关命令、更新代码中单位名称和重启OEM等步骤。
216

被折叠的 条评论
为什么被折叠?



