以下脚本可以提供一个Enterprise Manager Grid Control/Agent/Database Control发生故障时诊断问题,收集有用信息日志的思路; 显然大多数人对Grid Control/OMS 、 Agent 、 DB Console一些关键日志的存放路径都不太了解, 有这样一个大纲 就清晰多了:
-Grid Control/OMS
EMDIAG Kit : EMDIAG是一套收集Grid Control或DB Control诊断信息的工具
(Extracts data from the Grid Control or DB Control Repository to help you to maintain or diagnose problems
in your Grid Control or DB Control.);具体可以参考MOS文档EMDIAG Master Index [ID 421053.1]
- emctl status oms
- emctl getversion oms
- emctl status blackout
- emctl secure status oms
- emctl dump omsthread
- <OMS的ORACLE_HOME> 的补丁和版本信息
- <OMS的ORACLE_HOME>/sysman/config/emoms.properties
- <OMS的ORACLE_HOME>/sysman/config/emomslogging.properties
- <OMS的ORACLE_HOME>/sysman/setupinfo.txt
- <OMS的ORACLE_HOME>/sysman/admin/nsupportedtzs.lst
- <OMS的ORACLE_HOME>/sysman/admin/supportedtzs.lst
- <OMS的ORACLE_HOME>/sysman/admin/tzmappings.lst
- <OMS的ORACLE_HOME>/sysman/admin/discover/discover.lst
- <OMS的ORACLE_HOME>/sysman/config/httpd_em.conf
- <OMS的ORACLE_HOME>/sysman/config/*.properties
- <OMS的ORACLE_HOME>/sysman/emd/*.ini
- <OMS的ORACLE_HOME>/sysman/emd/*.xml
- <OMS的ORACLE_HOME>/sysman/recv
- <OMS的ORACLE_HOME>/j2ee/OC4J_EM/log/*
- <OMS的ORACLE_HOME>/j2ee/OC4J_EM/log/OC4J_EM_default_island_1/*
- <OMS的ORACLE_HOME>/cfgtoollogs/
- <OMS的ORACLE_HOME>/cfgtoollogs/cfgfw/*.log
- <OMS的ORACLE_HOME>/cfgtoollogs/oui/*.log
- <OMS的ORACLE_HOME>/cfgtoollogs/oui/*.err
- <OMS的ORACLE_HOME>/cfgtoollogs/oui/*.out
- <OMS的ORACLE_HOME>/cfgtoollogs/opatch/*.txt
- <OMS的ORACLE_HOME>/cfgtoollogs/opatch/*.log
- <OMS的ORACLE_HOME>/Apache/Apache/conf/*.conf
- <OMS的ORACLE_HOME>/config/*
- <OMS的ORACLE_HOME>/chgip/config/*
- <OMS的ORACLE_HOME>/chgip/log/*
- <OMS的ORACLE_HOME>/chgip/scripts/*
- <OMS的ORACLE_HOME>/dcm/config/*
- <OMS的ORACLE_HOME>/dcm/logs/*
- <OMS的ORACLE_HOME>/install/*
- <OMS的ORACLE_HOME>/j2ee/OC4J_EM/application-deployments/em/em/orion-web.xml
- <OMS的ORACLE_HOME>/j2ee/OC4J_EM/applications/em/em/WEB-INF/uix-config.xml
- <OMS的ORACLE_HOME>/j2ee/OC4J_EM/applications/em/em/WEB-INF/web.xml
- <OMS的ORACLE_HOME>/opmn/logs/*
- <OMS的ORACLE_HOME>/opmn/conf/*.xml
- <OMS的ORACLE_HOME>/opmn/conf/*.conf
Agent
- emctl status agent
- emctl upload
- emctl status agent scheduler
- emctl status agent memory
- emctl status agent jobs
- emctl config agent getTZ
- emctl status agent secure
- emctl secure status agent
- ping OMS服务器ip的结果
- <Agent的ORACLE_HOME> 的补丁和版本信息 opatch -lsinventory
- <Agent的ORACLE_HOME>/sysman/config/emd.properties
- <Agent的ORACLE_HOME>/sysman/config/emagentlogging.properties
- <Agent的ORACLE_HOME>/sysman/setupinfo.txt
- <Agent的ORACLE_HOME>/sysman/admin/nsupportedtzs.lst
- <Agent的ORACLE_HOME>/sysman/admin/supportedtzs.lst
- <Agent的ORACLE_HOME>/sysman/admin/tzmappings.lst
- <Agent的ORACLE_HOME>/sysman/admin/discover/discover.lst
- <Agent的ORACLE_HOME>/sysman/config/*.properties
- <Agent的ORACLE_HOME>/sysman/emd/*.ini
- <Agent的ORACLE_HOME>/sysman/emd/*.xml
- <Agent的ORACLE_HOME>/sysman/emd/
- <Agent的ORACLE_HOME>/sysman/log/*
- <Agent的ORACLE_HOME>/sysman/emd/*
- <Agent的ORACLE_HOME>/cfgtoollogs/
- <Agent的ORACLE_HOME>/cfgtoollogs/cfgfw/*.log
- <Agent的ORACLE_HOME>/cfgtoollogs/oui/*.log
- <Agent的ORACLE_HOME>/cfgtoollogs/oui/*.err
- <Agent的ORACLE_HOME>/cfgtoollogs/oui/*.out
- <Agent的ORACLE_HOME>/cfgtoollogs/opatch/*.txt
- <Agent的ORACLE_HOME>/cfgtoollogs/opatch/*.log
Enterprise Manager Database Control
同样可以用EMDIAG Kit 收集diag info
- emctl status dbconsole
- emctl status agent
- emctl upload
- emctl status agent scheduler
- emctl status agent jobs
- emctl config agent getTZ
- emctl status agent
- emctl status blackout
- $ORACLE_HOME/sysman/emd/targets.xml
- $ORACLE_HOME/<hostname>_<sid>/sysman/config/emoms.properties
- $ORACLE_HOME/<hostname>_<sid>/sysman/config/emomslogging.properties
- $ORACLE_HOME/<hostname>_<sid>/sysman/config/emd.properties
- $ORACLE_HOME/<hostname>_<sid>/sysman/config/emagentlogging.properties
- $ORACLE_HOME/sysman/admin/nsupportedtzs.lst
- $ORACLE_HOME/sysman/admin/supportedtzs.lst
- $ORACLE_HOME/sysman/admin/tzmappings.lst
- $ORACLE_HOME/sysman/admin/discover/discover.lst
- $ORACLE_HOME/<hostname>_<sid>/sysman/setupinfo.txt
- $ORACLE_HOME/<hostname>_<sid>/config/*
- $ORACLE_HOME/<hostname>_<sid>/emd/*.ini
- $ORACLE_HOME/<hostname>_<sid>/emd/*.xml
- $ORACLE_HOME/<hostname>_<sid>/emd/*.txt
- $ORACLE_HOME/<hostname>_<sid>/emd/state/
- $ORACLE_HOME/<hostname>_<sid>/emd/upload/
- $ORACLE_HOME/<hostname>_<sid>/emd/recv/
- $ORACLE_HOME/<hostname>_<sid>/sysman/log/*
- $ORACLE_HOME/opmn/logs/*
- $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname>_<sid>/log/*
- $ORACLE_HOME/cfgtoollogs/*
- $ORACLE_HOME/cfgtoollogs/emca/*
- $ORACLE_HOME/cfgtoollogs/cfgfw/*
- $ORACLE_HOME/cfgtoollogs/oui/*
- $ORACLE_HOME/cfgtoollogs/opatch/*
- $ORACLE_HOME/Apache/Apache/conf/*.conf
- $ORACLE_HOME/install/*
- $ORACLE_HOME/inventory/ContentsXML/comps.xml
- $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/WEB-INF/uix-config.xml
- $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/WEB-INF/web.xml
- $ORACLE_HOME/opmn/conf/opmn.xml
- $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname>_<sid>/application-deployments/default/defaultWebApp/*
- $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname>_<sid>/application-deployments/em/*
- $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname>_<sid>/application-deployments/em/em/*
- $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname>_<sid>/config/*