Grid Control OMS Agent代理工作原理图

我们在使用Grid Control集中化管理OS、Oracle数据库时要求在host上安装Agent代理程序,以便Agent定期收集OS、Oracle信息传输给Oracle Grid Control Management Server(OMS),并执行OMS下达的一系列指令。

大多数人对于Agent的了解仅限于如何安装和启动agent,下图展示了OMS Agent的架构:

 

 

Agent主要由2个组件(component)部分组成,分别是Collector 收集器和 Metric Engine 度量引擎。

 

Collector收集器是agent的重要子系统。它负责收集并上传metric data度量数据到OMS(oms最终将这些数据存入数据库中)。Collector 利用collection file中的信息判定针对哪些target目标需要收集metric data以及多久收集一次。 为了获取数据,Collector将查询投递给Metric Engine,而Metric Engine负责实际的metric data的收集。 Metric Engine  通过Fetchlets 、Metadata原信息文件(Metadata files defined in OH/sysman/admin/metadata)和 已发现的target 信息文件(Targets defined in OH/sysman/emd/targets.xml)来获得每一个目标的metrics监控信息。 同时 metadata原信息文件也提供了实际如何去计算metrics度量的算法。

 

基于以上这些信息,Metric Engine 将使用恰当的fetchlets从监控目标获取数据, 这里的 Fetchlets指的是指定数据的访问方式, 例如访问数据库性能数据会采用SQL Fetchlets,而访问OS数据则使用OS Fetchlets。

 

一旦Collector 收集到metric data,它会将这些度量数据和已定义的阀值做对比,检查是否发送警告(alert waring), 同时将这些度量信息保存到本地文件系统上($OH/sysman/emd/upload目录)。 这些文件最后通过http 或 https 协议 传送到OMS服务器的指定URL上,该URL被$OH/sysman/config/emd.properties 配置文件中的REPOSITORY_URL指定,如以下例子:

 

 

[root@nas ~]# cat /w01/wls/agent/core/12.1.0.1.0/stage/sysman/config/emd.properties
#
#   emd Root directory(read-only location). Metrics should not create files
#   under this directory
#
#
emdRoot=/w01/wls/agent/core/12.1.0.1.0

#
#   agent Root directory(writeable).s
#   Use this property to base any temporary file creation.
#
#
agentStateDir=%EMSTATE%

#  perl executable directory  
#
perlBin=/w01/wls/agent/core/12.1.0.1.0/perl/bin

#
# script directory
#
scriptsDir=/w01/wls/agent/core/12.1.0.1.0/sysman/admin/scripts

#
# stage directory for provisioning
#
emStageDir=/tmp

#
#  EMD main servlet URL
#
EMD_URL=http://nas:%EM_SERVLET_PORT%/emd/main/

#
#  OMS Upload URL
#
#  if there is no receiving OMS or if you wish to disable the UploadManager
#  please set this value to empty or comment out below line
#
REPOSITORY_URL=https://:4900/empbs/upload/

#
#The following properties are advanced read-only properties
#

#
# The location of the file that contains the root certificate.
#
emdRootCertLoc=/w01/wls/agent/core/12.1.0.1.0/sysman/config/b64LocalCertificate.txt
internetCertLoc=/w01/wls/agent/core/12.1.0.1.0/sysman/config/b64InternetCertificate.txt

#
# The download URL for the EMD Oracle Wallet and its local file location.
#
# Note: Ensure that this URL references a valid port number at which the
# console is available on http
#
emdWalletSrcUrl=https://:4900/em/wallets/emd
emdWalletDest=/w01/wls/agent/core/12.1.0.1.0/sysman/config/server

# JAVA HOME required for agent operations
#
JAVA_HOME=/w01/wls/agent/core/12.1.0.1.0/jdk

#
# This string is used by the agent to determine which algorithm to use for encrypted data
# The string value will be same as the release version
#
agentVersion=12.1.0.1.0

#
# To enable the metric browser, uncomment the following line
# This is a reloadable parameter
#
#_enableMetricBrowser=true

#
# These are the optional Java flags for the agent
#
agentJavaDefines=-Xmx128m

#
#   The agent base directory.
#
agentBaseDir=/w01/wls/agent

#
############################################################################
########################### Modifiable Properties ##########################
############################################################################
#

#
#### Tracing related properties
#

#
# emagent perl tracing levels
# supported levels: DEBUG, INFO, WARN, ERROR
# default level is WARN
#
#
EMAGENT_PERL_TRACE_LEVEL=INFO

# logging properties
Logger.log4j.appender.Rolling=org.apache.log4j.RollingFileAppender
Logger.log4j.appender.Rolling.File=%EMSTATE%/sysman/log/gcagent.log
Logger.log4j.appender.Rolling.Append=true
Logger.log4j.appender.Rolling.MaxFileSize=5000000
Logger.log4j.appender.Rolling.MaxBackupIndex=10
Logger.log4j.appender.Rolling.layout=oracle.sysman.gcagent.util.logging.GCPattern
# FOR NOW add a nother log for errors
Logger.log4j.appender.Errors=org.apache.log4j.RollingFileAppender
Logger.log4j.appender.Errors.File=%EMSTATE%/sysman/log/gcagent_errors.log
Logger.log4j.appender.Errors.Append=true
Logger.log4j.appender.Errors.Threshold=ERROR
Logger.log4j.appender.Errors.layout=oracle.sysman.gcagent.util.logging.GCPattern
Logger.log4j.appender.Errors.MaxFileSize=50000000
Logger.log4j.appender.Errors.MaxBackupIndex=3
# Add a test appender for individual tests
Logger.log4j.appender.Test=org.apache.log4j.FileAppender
Logger.log4j.appender.Test.File=/dev/null
Logger.log4j.appender.Test.Append=true
Logger.log4j.appender.Test.Threshold=DEBUG
Logger.log4j.appender.Test.layout=oracle.sysman.gcagent.util.logging.GCPattern

#
# If you increase the maximum file size for the Mdu and Errors logs, you
# should consider setting _maxFileSizeToCopy to a value that is higher then the
# new number (please note that this will potnetially increase the size of your
# incidents)
#

#
# Set root category priority to INFO and its only appender to Rolling.
Logger.log4j.rootCategory=INFO, Rolling, Errors, Test

#
# Enable HTTPListener (jetty) at INFO level.
# TODO: remove this when true trace is supported
Logger.log4j.category.oracle.sysman.gcagent.comm.agent.http.HTTPListener=INFO

Logger.log4j.appender.stdout=org.apache.log4j.ConsoleAppender
Logger.log4j.appender.stdout.layout=oracle.sysman.gcagent.util.logging.GCPattern

# Set the class loaders to level INFO
Logger.log4j.category.oracle.sysman.gcagent.metadata.impl.ChainedClassLoader=INFO
Logger.log4j.category.oracle.sysman.gcagent.metadata.impl.ReverseDelegationClassLoader=INFO
Logger.log4j.category.oracle.sysman.gcagent.metadata.impl.PluginLibraryClassLoader=INFO
Logger.log4j.category.oracle.sysman.gcagent.metadata.impl.PluginClassLoader=INFO

# Add an appender for MetaData Updates
Logger.log4j.appender.Mdu=org.apache.log4j.RollingFileAppender
Logger.log4j.appender.Mdu.File=%EMSTATE%/sysman/log/gcagent_mdu.log
Logger.log4j.appender.Mdu.Append=true
Logger.log4j.appender.Mdu.Threshold=INFO
Logger.log4j.appender.Mdu.layout=org.apache.log4j.PatternLayout
Logger.log4j.appender.Mdu.layout.ConversionPattern=%d [%t] - %m%n
Logger.log4j.appender.Mdu.MaxFileSize=50000000
Logger.log4j.appender.Mdu.MaxBackupIndex=3

Logger.log4j.category.oracle.sysman.gcagent.dispatch.MetadataUpdater=INFO, Mdu
Logger.log4j.additivity.oracle.sysman.gcagent.dispatch.MetadataUpdater=false

# Turn off QA log by default
Logger.log4j.category.QA=FATAL, QA

#Logger._enableTrace=true

#
#### Scalability related properties
#

#List of ora errors which can be ignored and need not be uploaded to repos
IgnoreDownOraErrors=12541,01033,01034,12505,03134,12170,12500,01219,1089,12560,12514,12528,12545

################################
#
# Put all additional properties here
#
################################

# uncomment for ease of debugging
#MaxThreads=1

# Set the server's graceful shutdown delay.
GracefulShutdownDelay=3

# Dump the dispatcher when overloaded
_dumpDispatcherWhenOverloaded=true

# Whether the EMD should listen on all NICs on the current host (the default)
# or just the NIC associated with the hostname in EMD_URL
AgentListenOnAllNICs=true

# Dump each request
#_dumpEveryDispatcherRequest=true

# Dynamic properties timeout for specific target types
dynamicPropsComputeTimeout_rac_database=180
dynamicPropsComputeTimeout_cluster=180
dynamicPropsComputeTimeout_has=180
dynamicPropsComputeTimeout_oracle_database=180
dynamicPropsComputeTimeout_oc4jjvm=180
dynamicPropsComputeTimeout_microsoft_sqlserver_database=180
dynamicPropsComputeTimeout_host=180
dynamicPropsComputeTimeout_osm_instance=180

_disableLoadDPFromCacheNormal=true

#Enable jobsystem streams tracing
_enableJobSystemStreamsTracing=true

# Allow beacon aplication to have 500 megabytes of space. Primarily for ATS collections.
# 500 * 1024 * 1024 = 524288000
applicationMetadataQuota_BEACON=524288000

#Enable auto tuning out of the box
enableAutoTuning=true

 

由Collector最终收集到的这些信息文件仅在满足以下任意条件时实际传送给OMS:

1) 有一条alert告警信息需要发送
2) Collector收集到的信息文件的大小超过一个预定值(默认为20MB 20480KB), 该预定限制值由$OH/sysman/config/emd.properties中UploadFileSize参数指定。
3) 从上一次数据加载算起时间超过30分钟(默认),该预订限制值由$OH/sysman/config/emd.properties中UploadInterval 参数指定。

 

注意与Agent的处理方式不同,由Agent发送给OMS的Alert severities告警信息,OMS会直接将其存入到EM Repository数据库中,而不是以临时文件的形式暂存。

 

Agent除了Metric Engine和Collector 2个主要模块外, 还有其他子系统负责完成不同的工作:

 

  • Target Manager
    • Target Manager holds monitored targets
    • Target data in $EM/sysman/emd/targets.xml
    • lists managed targets, each with name, type, and other properties
    • Credential properties are encrypted
    • Targets can be marked broken
      • Required properties not provided
      • Dynamic properties take too long to compute
    • Discovery of new target instances possible by running perl scripts that list unmonitored instances.
  • Metric Engine
    • Driven by XML target metadata
    • one file per target-type, found in $OH/sysman/admin/metadata/*.xml
    • defines metrics; each may have multiple columns
    • for each metric, defines how data is collected:
      • QueryDescriptor : by fetchlet
      • PushDescriptor: by recvlet
      • ExecutionDescriptor: aggregation from other metrics
    • Supports multiple target versions with ValidIf
    • Defines properties for target type
      • Instance properties: specified in targets.xml
      • Dynamic properties: computed by metric engine
    • Metric Engine holds target-type metadata
      • given a target and a metric name, calls fetchlet manager and/or metric cache and returns a metric result
    • Metric Cache caches last-collected data for use in computing expressions
    • Aggregate metric support allows metrics to be computed via views, joins and group bys over other metrics
      • GetView: select columns or rows from a MetricResult
      • GroupBy: compute aggregation information (SUM, COUNT, MIN, MAX)
      • Union: add rows returned by multiple MetricResults
      • JoinTables: combine multiple metrics’ columns
  • Fetchlet Manager
    • A fetchlet is a data-access mechanism available to compute metric data
      • OS fetchlets : launch an OS process and interpret output
        • OS Fetchlet
        • OSLine Fetchlet
        • OSLineToken
        • UDM : User Defined Metric
      • SQL fetchlet : run a SQL or PL/SQL statement
      • URL fetchlets
        • HTTP data
        • URLTiming Fetchlet
      • and more…
  • Collection Manager
    • Holds all collections, both default and per-target
    • CollectionItem is the basic unit of scheduled collection
    • multiple metrics collected from the same target at the same interval can be collected in the same thread (MetricColl)
    • Once data is collected for a CollectionItem, any Conditions are evaluated
      • three states: Clear, Warning, Critical or Unknown
      • last evaluated Condition states are stored in $EM/sysman/emd/state/*
    • Collection XML files
      • default collections defined for all targets of a type in $OH/sysman/admin/default_collection/*.xml
      • additional collections for a particular target in $EM/sysman/emd/collection/*.xml
      • specifies, by metric, schedule for collection and thresholds to be applied to columns
  • Blackout Manager
    • Manage blackout information stored in $EM/sysman/emd/blackouts.xml
    • Scheduled collections consult Blackout Manager; if target is currently blacked-out, collection does not proceed
    • Targets may be affected by multiple blackouts; if any blackout is effective on a target, the target is blacked-out
    • Node blackouts affect all targets monitored by the agent
    • Blackouts file :
      • blackouts in $EM/sysman/emd/blackouts.xml
      • each blackout can be applied to one or more targets; if target is node, blackout applies to all targets
      • blackout can be immediate or scheduled; if scheduled, can be one-time or repeated
  • Scheduler
    • Schedules activities in order of next run time
      • multiple schedule formats:
        • Once: happens only once
        • Interval: happens every n minutes/hours/days
        • Week: happens on certain day of week
        • Month: happens on certain day of month
      • can specify begin time/end time
    • Spawns threads to do work whose time has arrived
    • Used by Collector and Blackout Manager
    • Health Monitor checks that the scheduler is doing its work
    • emctl status agent scheduler
      • Dumps out all the scheduled elements
  • Upload Manager
    • As data is collected by other agent components, serializes writing of  intermediary .dat files (stored in $AS/sysman/emd/upload)
    • .dat files merged into .xml files on five priority channels
    • XML files sent to OMS as HTTP requests
    • maintains statistics on pending xml files; will disable collections based on number of files, aggregate size of files, and percentage free disk space on upload filesystem
    • Upload interval dynamic, based on properties and previous upload status
  • Ping Manager
    • Periodically, sends HTTP heartbeat request to OMS and verifies response
    • OMS response dictates interval before next ping
    • Exchange timezone information
    • A successful ping from the agent to the OMS is required before any uploads will occur

Oracle Enterprise Manager Cloud Control 12c(12.1) OMS&Agent安装图文指南

第一次用百度文库的文档分享功能。

Script:List Grid Control Jobs

以下脚本可以用于列出Grid Control中的定式作业:

SET verify OFF
SET linesize 255
SET pagesize 128
SET trimout ON
SET trimspool ON
SPOOL jobdump.log
ALTER SESSION SET nls_date_format='MON-DD-YYYY hh:mi:ss pm';
 
COLUMN status format a15
 
COLUMN job_name FORMAT a64
COLUMN job_type FORMAT a32
COLUMN job_owner FORMAT a32
COLUMN job_status format 99
COLUMN target_type format a64
 
COLUMN frequency_code format a20
COLUMN  interval format 99999999
 
VARIABLE JOBID VARCHAR2(64);
 
PROMPT *********************** JOB INFO ********************************
 
REM Get the job id
SET serveroutput on
BEGIN
    SELECT job_id INTO :JOBID
    FROM   MGMT_JOB
    WHERE  job_name='&&jobName'
    AND    job_owner='&&jobOwner'
    AND    nested=0;
 
EXCEPTION
    WHEN NO_DATA_FOUND THEN
    BEGIN
        DBMS_OUTPUT.put_line('JOB NOT FOUND, TRYING NAME ONLY');
        SELECT job_id INTO :JOBID
        FROM   MGMT_JOB
        WHERE  job_name='&&jobName'
        AND    nested=0
        AND    ROWNUM=1;
    EXCEPTION
        WHEN NO_DATA_FOUND THEN
            DBMS_OUTPUT.put_line('JOB NOT FOUND');
    END;
END;
/
 
SELECT  job_name, job_owner, job_type, system_job, job_status, target_type
FROM    MGMT_JOB
WHERE   job_id=HEXTORAW(:JOBID);
 
PROMPT *********************** JOB SCHEDULE ****************************
SELECT  DECODE(frequency_code,
               1, 'Once',
               2, 'Interval',
               3, 'Daily',
               4, 'Day of Week',
               5, 'Day of Month',
               6, 'Day of Year', frequency_code) "FREQUENCY_CODE",
        start_time, end_time, execution_hours, execution_minutes,
        interval, months, days, timezone_info, timezone_target_index,
        timezone_offset, timezone_region
FROM    MGMT_JOB_SCHEDULE s, MGMT_JOB j
WHERE   s.schedule_id=j.schedule_id
AND     j.job_id=HEXTORAW(:JOBID);
 
PROMPT ********************** PARAMETERS ********************************
SELECT  parameter_name,
        decode(parameter_type,
               0, 'Scalar',
               1, 'Vector',
               2, 'Large', parameter_type) "PARAMETER_TYPE",
        scalar_value, vector_value
FROM    MGMT_JOB_PARAMETER
WHERE   job_id=HEXTORAW(:JOBID)
AND     execution_id=HEXTORAW('0000000000000000')
ORDER BY parameter_name;
 
PROMPT ********************** TARGETS ********************************
SELECT  target_name, target_type
FROM    MGMT_JOB_TARGET jt, MGMT_TARGETS t
WHERE   job_id=HEXTORAW(:JOBID)
AND     execution_id=HEXTORAW('0000000000000000')
AND     jt.target_guid=t.target_guid
ORDER BY target_type, target_name;
 
PROMPT ********************** FLAT TARGETS ********************************
SELECT  target_name, target_type
FROM    MGMT_JOB_FLAT_TARGETS jft, MGMT_TARGETS t
WHERE   job_id=HEXTORAW(:JOBID)
AND     jft.target_guid=t.target_guid
ORDER BY target_type, target_name;
 
 
PROMPT ************************ EXECUTIONS *******************************
SELECT  execution_id,
        DECODE(status,
               1, 'SCHEDULED',
               2, 'RUNNING',
               3, 'FAILED INIT',
               4, 'FAILED',
               5, 'SUCCEEDED',
               6, 'SUSPENDED',
               7, 'AGENT DOWN',
               8, 'STOPPED',
               9, 'SUSPENDED/LOCK',
               10, 'SUSPENDED/EVENT',
               11, 'SUSPENDED/BLACKOUT',
               12, 'STOP PENDING',
               13, 'SUSPEND PENDING',
               14, 'INACTIVE',
               15, 'QUEUED',
               16, 'FAILED/RETRIED',
               17, 'WAITING',
               18, 'SKIPPED', status) "STATUS",
        scheduled_time, start_time, end_time
FROM    MGMT_JOB_EXEC_SUMMARY e
WHERE   job_id=HEXTORAW(:JOBID)
ORDER BY scheduled_time;
 
 
UNDEFINE jobName
UNDEFINE jobOwner
UNDEFINE JOBID


SPOOL OFF

Script:GridControl Repository Health Check

以下脚本可以用于检查Grid Control(OMS) Repository的健康程度:

set linesize 130
set pagesize 50000
Set feedback off
set heading off
SPOOL RepositoryHealth.log

PROMPT ********* Report to capture the Health of the EM Grid Control Repository  ******

Prompt
Prompt ***   EM Vital Statistics   ***
Prompt --------------------------------

--- Total number of targets monitored by EM
select 'Total Targets=', TO_CHAR(count(*)) from mgmt_targets;

--- Number of targets that are not listed with an 'UP' availability status.
select 'Targets Not Up=',to_char(count(*)) from mgmt_current_availability where current_status != 1;

--- Loader Thread count
select  'Loader Threads=', TO_CHAR(count(distinct key_value))
from mgmt_metrics_1hour h, mgmt_metrics m, mgmt_targets t where
t.target_type = 'oracle_emrep' and
m.target_type = t.target_type and
m.metric_name = 'Management_Loader_Status' and
m.metric_column = 'load_processing' and
m.metric_guid = h.metric_guid and
h.target_guid = t.target_guid and
rollup_timestamp > sysdate-7 and
t.type_meta_ver = m.type_meta_ver and
(t.category_prop_1 = m.category_prop_1 OR m.category_prop_1 = ' ') and
(t.category_prop_2 = m.category_prop_2 OR m.category_prop_2 = ' ') and
(t.category_prop_3 = m.category_prop_3 OR m.category_prop_3 = ' ') and
(t.category_prop_4 = m.category_prop_4 OR m.category_prop_4 = ' ') and
(t.category_prop_5 = m.category_prop_5 OR m.category_prop_5 = ' ');

--- Rows per second per loader thread.
select 'Avg Loader Rows/Second/Thread=', TO_CHAR(round(avg(value_average),2))
from mgmt_metrics_1hour h, mgmt_metrics m, mgmt_targets t where
t.target_type = 'oracle_emrep' and
m.target_type = t.target_type and
m.metric_name = 'Management_Loader_Status' and
m.metric_column = 'load_processing' and
m.metric_guid = h.metric_guid and
h.target_guid = t.target_guid and
rollup_timestamp > sysdate-7 and
t.type_meta_ver = m.type_meta_ver and
(t.category_prop_1 = m.category_prop_1 OR m.category_prop_1 = ' ') and
(t.category_prop_2 = m.category_prop_2 OR m.category_prop_2 = ' ') and
(t.category_prop_3 = m.category_prop_3 OR m.category_prop_3 = ' ') and
(t.category_prop_4 = m.category_prop_4 OR m.category_prop_4 = ' ') and
(t.category_prop_5 = m.category_prop_5 OR m.category_prop_5 = ' ')
group by metric_name, metric_column;
 
--- Loader rows per hour
select 'Avg Loader Rows/Hour/Thread=', TO_CHAR(round(avg(value_average),2))
from mgmt_metrics_1hour h, mgmt_metrics m, mgmt_targets t where
t.target_type = 'oracle_emrep' and
m.target_type = t.target_type and
m.metric_name = 'Management_Loader_Status' and
m.metric_column = 'loader_processing_hour' and
m.metric_guid = h.metric_guid and
h.target_guid = t.target_guid and
rollup_timestamp > sysdate-7 and
t.type_meta_ver = m.type_meta_ver and
(t.category_prop_1 = m.category_prop_1 OR m.category_prop_1 = ' ') and
(t.category_prop_2 = m.category_prop_2 OR m.category_prop_2 = ' ') and
(t.category_prop_3 = m.category_prop_3 OR m.category_prop_3 = ' ') and
(t.category_prop_4 = m.category_prop_4 OR m.category_prop_4 = ' ') and
(t.category_prop_5 = m.category_prop_5 OR m.category_prop_5 = ' ')
group by metric_name, metric_column;
 
--- Loader thread run time % of hour
select 'Avg Loader Pct Hour Run/Thread=', TO_CHAR(round((avg(value_average)/3600)*100,2))
from mgmt_metrics_1hour h, mgmt_metrics m, mgmt_targets t where
t.target_type = 'oracle_emrep' and
m.target_type = t.target_type and
m.metric_name = 'Management_Loader_Status' and
m.metric_column = 'load_run' and
m.metric_guid = h.metric_guid and
h.target_guid = t.target_guid and
rollup_timestamp > sysdate-7 and
t.type_meta_ver = m.type_meta_ver and
(t.category_prop_1 = m.category_prop_1 OR m.category_prop_1 = ' ') and
(t.category_prop_2 = m.category_prop_2 OR m.category_prop_2 = ' ') and
(t.category_prop_3 = m.category_prop_3 OR m.category_prop_3 = ' ') and
(t.category_prop_4 = m.category_prop_4 OR m.category_prop_4 = ' ') and
(t.category_prop_5 = m.category_prop_5 OR m.category_prop_5 = ' ')
group by metric_name, metric_column;
 
--- Rollup Rows per hour
select 'Avg Rollup Rows/Hour=', TO_CHAR(round(avg(value_average),2))
from mgmt_metrics_1hour h, mgmt_metrics m, mgmt_targets t where
t.target_type = 'oracle_emrep' and
m.target_type = t.target_type and
m.metric_name = 'DBMS_Job_Status' and
m.metric_column = 'jobthroughput' and
h.key_value = 'Rollup' and
m.metric_guid = h.metric_guid and
h.target_guid = t.target_guid and
rollup_timestamp > sysdate-7 and
t.type_meta_ver = m.type_meta_ver and
(t.category_prop_1 = m.category_prop_1 OR m.category_prop_1 = ' ') and
(t.category_prop_2 = m.category_prop_2 OR m.category_prop_2 = ' ') and
(t.category_prop_3 = m.category_prop_3 OR m.category_prop_3 = ' ') and
(t.category_prop_4 = m.category_prop_4 OR m.category_prop_4 = ' ') and
(t.category_prop_5 = m.category_prop_5 OR m.category_prop_5 = ' ')
group by metric_name, metric_column;

--- Rollup % of hour run
select 'Avg Rollup Pct Hour Run=', TO_CHAR(round(avg(value_average),2))
from mgmt_metrics_1hour h, mgmt_metrics m, mgmt_targets t where
t.target_type = 'oracle_emrep' and
m.target_type = t.target_type and
m.metric_name = 'DBMS_Job_Status' and
m.metric_column = 'jobprocessing' and
h.key_value = 'Rollup' and
m.metric_guid = h.metric_guid and
h.target_guid = t.target_guid and
rollup_timestamp > sysdate-7 and
t.type_meta_ver = m.type_meta_ver and
(t.category_prop_1 = m.category_prop_1 OR m.category_prop_1 = ' ') and
(t.category_prop_2 = m.category_prop_2 OR m.category_prop_2 = ' ') and
(t.category_prop_3 = m.category_prop_3 OR m.category_prop_3 = ' ') and
(t.category_prop_4 = m.category_prop_4 OR m.category_prop_4 = ' ') and
(t.category_prop_5 = m.category_prop_5 OR m.category_prop_5 = ' ')
group by metric_name, metric_column;

--- Number of job dispatchers (hint: equal to number of Management Servers)
select  'Job Dispatchers=', TO_CHAR(count(distinct key_value))
from mgmt_metrics_1hour h, mgmt_metrics m, mgmt_targets t where
t.target_type = 'oracle_emrep' and
m.target_type = t.target_type and
m.metric_name = 'Job_Dispatcher_Performance' and
m.metric_column = 'throughput' and
m.metric_guid = h.metric_guid and
h.target_guid = t.target_guid and
rollup_timestamp > sysdate-7 and
t.type_meta_ver = m.type_meta_ver and
(t.category_prop_1 = m.category_prop_1 OR m.category_prop_1 = ' ') and
(t.category_prop_2 = m.category_prop_2 OR m.category_prop_2 = ' ') and
(t.category_prop_3 = m.category_prop_3 OR m.category_prop_3 = ' ') and
(t.category_prop_4 = m.category_prop_4 OR m.category_prop_4 = ' ') and
(t.category_prop_5 = m.category_prop_5 OR m.category_prop_5 = ' ');

 
--- Job steps processed per second
select 'Avg Job Steps/Second=', TO_CHAR(round(avg(value_average),2))
from mgmt_metrics_1hour h, mgmt_metrics m, mgmt_targets t where
t.target_type = 'oracle_emrep' and
m.target_type = t.target_type and
m.metric_name = 'Job_Dispatcher_Performance' and
m.metric_column = 'throughput' and
m.metric_guid = h.metric_guid and
h.target_guid = t.target_guid and
rollup_timestamp > sysdate-7 and
t.type_meta_ver = m.type_meta_ver and
(t.category_prop_1 = m.category_prop_1 OR m.category_prop_1 = ' ') and
(t.category_prop_2 = m.category_prop_2 OR m.category_prop_2 = ' ') and
(t.category_prop_3 = m.category_prop_3 OR m.category_prop_3 = ' ') and
(t.category_prop_4 = m.category_prop_4 OR m.category_prop_4 = ' ') and
(t.category_prop_5 = m.category_prop_5 OR m.category_prop_5 = ' ')
group by metric_name, metric_column;

 
---  Notifications Per Second
select 'Avg Notifications/Second=', TO_CHAR(round(avg(value_average),2))
from mgmt_metrics_1hour h, mgmt_metrics m, mgmt_targets t where
t.target_type = 'oracle_emrep' and
m.target_type = t.target_type and
m.metric_name = 'Notification_Performance' and
m.metric_column = 'notificationthroughput' and
m.metric_guid = h.metric_guid and
h.target_guid = t.target_guid and
rollup_timestamp > sysdate-7 and
t.type_meta_ver = m.type_meta_ver and
(t.category_prop_1 = m.category_prop_1 OR m.category_prop_1 = ' ') and
(t.category_prop_2 = m.category_prop_2 OR m.category_prop_2 = ' ') and
(t.category_prop_3 = m.category_prop_3 OR m.category_prop_3 = ' ') and
(t.category_prop_4 = m.category_prop_4 OR m.category_prop_4 = ' ') and
(t.category_prop_5 = m.category_prop_5 OR m.category_prop_5 = ' ')
group by metric_name, metric_column;

--- Notification % of hour run
select 'Avg Notification Pct Hour Run=', TO_CHAR(round(avg(value_average),2))
from mgmt_metrics_1hour h, mgmt_metrics m, mgmt_targets t where
t.target_type = 'oracle_emrep' and
m.target_type = t.target_type and
m.metric_name = 'Notification_Performance' and
m.metric_column = 'notificationprocessing' and
m.metric_guid = h.metric_guid and
h.target_guid = t.target_guid and
rollup_timestamp > sysdate-7 and
t.type_meta_ver = m.type_meta_ver and
(t.category_prop_1 = m.category_prop_1 OR m.category_prop_1 = ' ') and
(t.category_prop_2 = m.category_prop_2 OR m.category_prop_2 = ' ') and
(t.category_prop_3 = m.category_prop_3 OR m.category_prop_3 = ' ') and
(t.category_prop_4 = m.category_prop_4 OR m.category_prop_4 = ' ') and
(t.category_prop_5 = m.category_prop_5 OR m.category_prop_5 = ' ')
group by metric_name, metric_column;

--- Severities per hour
select 'Avg Severities Per Hour=', TO_CHAR(round(avg(count(*)),2)) as sev_count from mgmt_severity
where collection_timestamp > sysdate - 7
group by trunc(collection_timestamp, 'HH');

--- OMS Host CPU Util
select 'Avg Management Server Host CPU=', TO_CHAR(round(avg(value_average),2)), t.target_name
from mgmt_metrics_1hour h, mgmt_targets t where
h.target_guid in (select target_guid from mgmt_targets t where
target_type = 'host' and
target_name in (select substr(host_url,1,instr(host_url, '_Management_Service',-1,1)-1)
                                 from mgmt_oms_parameters)) and
h.metric_guid = (select m.metric_guid from mgmt_metrics m where
                          m.target_type = 'host' and
                          m.metric_name = 'Load' and
                          m.metric_column = 'cpuUtil'and
                          t.type_meta_ver = m.type_meta_ver and
                         (t.category_prop_1 = m.category_prop_1 OR m.category_prop_1 = ' ') and
                         (t.category_prop_2 = m.category_prop_2 OR m.category_prop_2 = ' ') and
                         (t.category_prop_3 = m.category_prop_3 OR m.category_prop_3 = ' ') and
                         (t.category_prop_4 = m.category_prop_4 OR m.category_prop_4 = ' ') and
                         (t.category_prop_5 = m.category_prop_5 OR m.category_prop_5 = ' ')) and
h.target_guid = t.target_guid and
rollup_timestamp > sysdate-7
group by t.target_name;

--- Create a small table to get DB Guids. GV$INSTANCE performance is inconsistant across db versions.
create table mgmt_temp_vsign_db_guids as select h.target_guid from mgmt_targets h where
                   h.target_type = 'host' and
                   h.target_name in (select s.target_name from mgmt_targets s, gv$instance g where
                                                      s.target_type = 'host' and
                                                      s.target_name like g.host_name || '%');

--- Run CBO stat analysis on temp table for performance.
exec dbms_stats.gather_table_stats('SYSMAN','MGMT_TEMP_VSIGN_DB_GUIDS',NULL, DBMS_STATS.AUTO_SAMPLE_SIZE, FALSE,'FOR ALL COLUMNS SIZE AUTO',NULL,'GLOBAL',TRUE,NULL,NULL,NULL);

--- EM Repository CPU
select 'Avg Management Repository Host CPU=', TO_CHAR(round(avg(value_average),2)), t.target_name
from mgmt_metrics_1hour h, mgmt_targets t where
h.target_guid in (select target_guid from mgmt_temp_vsign_db_guids) and
h.metric_guid = (select m.metric_guid from mgmt_metrics m where
                           m.target_type = 'host' and
                           m.metric_name = 'Load' and
                           m.metric_column = 'cpuUtil'and
                           t.type_meta_ver = m.type_meta_ver and
                          (t.category_prop_1 = m.category_prop_1 OR m.category_prop_1 = ' ') and
                          (t.category_prop_2 = m.category_prop_2 OR m.category_prop_2 = ' ') and
                          (t.category_prop_3 = m.category_prop_3 OR m.category_prop_3 = ' ') and
                          (t.category_prop_4 = m.category_prop_4 OR m.category_prop_4 = ' ') and
                          (t.category_prop_5 = m.category_prop_5 OR m.category_prop_5 = ' ')) and
h.target_guid = t.target_guid and
rollup_timestamp > sysdate-7
group by t.target_name;

--- Repository Used Space
select 'Repository Used Space (GB)=',  TO_CHAR(round(max(value_average)/1000,2))
from mgmt_metrics_1hour h, mgmt_metrics m, mgmt_targets t where
t.target_type = 'oracle_emrep' and
m.target_type = t.target_type and
m.metric_name = 'Configuration' and
m.metric_column = 'usedRepSpace' and
m.metric_guid = h.metric_guid and
h.target_guid = t.target_guid and
rollup_timestamp > sysdate-1 and
t.type_meta_ver = m.type_meta_ver and
(t.category_prop_1 = m.category_prop_1 OR m.category_prop_1 = ' ') and
(t.category_prop_2 = m.category_prop_2 OR m.category_prop_2 = ' ') and
(t.category_prop_3 = m.category_prop_3 OR m.category_prop_3 = ' ') and
(t.category_prop_4 = m.category_prop_4 OR m.category_prop_4 = ' ') and
(t.category_prop_5 = m.category_prop_5 OR m.category_prop_5 = ' ');


--- Drop the temp table
drop table mgmt_temp_vsign_db_guids;
 
set heading on

PROMPT ------------------------------------------------------------------------------------------
PROMPT
PROMPT **** The number of management Errors that have occurred per Module in the past 24 hours
 SELECT module_name Module, COUNT(*)
        FROM   mgmt_system_error_log
        WHERE  occur_date> SYSDATE-1
        GROUP BY module_name
        ORDER BY module_name;

PROMPT **** The Following Errors have occurred in the past two days
alter session set nls_date_format='MM/DD/YYYY HH24:MI';
column Module format a15
column Agent format a20
column error_msg format a60
select occur_date, module_name Module, emd_url Agent, error_msg
  from mgmt_system_error_log
 where occur_date > sysdate - 2
 order by occur_date;


 
PROMPT ------------------------------------------------------------------------------------------

PROMPT **** Check the status of all DBMS_JOBS and look for broken jobs or next_run data that is already in the past.
column Job format a8
column interval format a25
column what format a45

        SELECT to_char(job) Job, TO_CHAR(next_date,'DD-MON-YYYY HH24:MI:SS') next_run,
           interval, broken, what
        FROM   user_jobs
        ORDER BY next_date DESC;

PROMPT  -----------------------------------------------------------------------------------------

PROMPT **** Show the performance statistics of all jobs over the last 24 hours:
column Job_name format a50
     SELECT job_name, COUNT(*) n_recs,
            MIN(duration) min_duration, MAX(duration) max_duration, ROUND(AVG(duration),2) avg_duration
     FROM   mgmt_system_performance_log
     WHERE  is_total = 'Y'
       AND  time> SYSDATE-1
     GROUP BY job_name
     ORDER BY job_name;

 
PROMPT ------------------------------------------------------------------------------------------

PROMPT **** Overview of all Agent XML activity of the last day:
SELECT module, cnt "Number", TO_CHAR(FLOOR(mins/60),'999')||':'||TO_CHAR(MOD(mins,60),'09')||':'||TO_CHAR(MOD(secs,60),'09') "Time Spent"
FROM   (SELECT module, COUNT(*) cnt, ROUND(SUM(duration)/1000) secs, FLOOR(SUM(duration)/60000) mins
        FROM   mgmt_system_performance_log
        WHERE  job_name = 'LOADER'
          AND  time > SYSDATE-1
        GROUP BY module)
ORDER BY cnt DESC;

spool off

在OEL5上安装配置Oracle Gird Control 10.2.0.5

早期的Grid Control问题实在太多了,以至于把10.2.0.1的Grid Control升级到10.2.0.5几乎是不可能完成的任务;此外10.2.0.5以前的gc不支持11g作为repository database仓库数据库,不仅于此10.2.0.1版本是不支持rhel5或OEL5的,如果想安装的话rhel/oel 4是仅有理想的平台。这就这为我们制造了许多局限。如果是Fresh Installation的话似乎只安装软件(software only),而不在安装10.2.0.1阶段配置oms,在升级到10.2.0.5后再进行oms的config会是一种比较理想的安装方法。不过我们仍需要应付一个复杂的配置过程,写这个文档的目的是帮助我们应付(包括已安装过的人,因为很容易忘记)这种窘况。

1.我们需要一个已经存在的Oracle数据库,当然它应当是纯净的(没有相关的em repository),其版本最好是10.2.0.5或者11.2.0.2;我们假设你的数据库已经满足了一切安装grid control的前提要求,这包括设置几个初始化参数和装有dbms_shared_pool包等等。

2.其次你需要下载对应的软件,这包括了完全版本的10.2.0.1安装介质和10.2.0.5 gc patchset,并且最好有10.2.0.5版的agent(个人经验agent不太稳定,有时候需要重配,所以有介质的话会方便些):

  • Linux_Grid_Control_full_102010_disk1.zip
  • Linux_Grid_Control_full_102010_disk2.zip
  • Linux_Grid_Control_full_102010_disk3.zip
  • gc_x86_64_10205_part1of2.zip
  • gc_x86_64_10205_part2of2.zip
  • Linux_x86_64_Grid_Control_agent_download_10_2_0_5_0.zip

要下载这一大堆介质可能是我们安装过程中最麻烦的一件事情,特别是当你的网络状况欠佳的季节。
因为都是zip包,所以你只需要使用unzip命令将以上介质一一解压到合适目录就可以了。

3.配置OMS所在主机的内核参数和rpm包,下面给出了相关配置文件的示例值:

/etc/sysctl.conf:
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
# semaphores: semmsl, semmns, semopm, semmni
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144

/* 注意以上参数并不一定适合你的主机,具体如何配置请参见Metalink文档 */

同时修改/etc/security/limits.conf参数文件:
*               soft    nproc   2047
*               hard    nproc   16384
*               soft    nofile  1024
*               hard    nofile  65536

/* 星号换上你的安装用户名,如oracle或者其他dba组成员 */

安装适当的rpm包,安装database时需要的包一律也都需要,此外请特别留意安装一下几个包:
compat-libstdc++-296-2.96-138.i386
libstdc++-devel-4.1.2-48.el5.x86_64
libstdc++-devel-4.1.2-48.el5.i386
glibc-devel-2.5-49.x86_64
glibc-devel-2.5-49.i386

并建立下列符号连接:
ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2

4.上述工作完成后我们需要修改response文件以满足安装的需要,在10.2.0.1安装介质的解压目录下操作:

[root@nas media]# ls
dcommon  doc  index.htm  install  libskgxn  oms  rdbms  response  runInstaller  stage

[root@nas media]# vi response/em_using_existing_db.rsp 

/* 修改em_using_existing_db.rsp响应文件 */

包括以下参数需要从默认值修改为指定值:
UNIX_GROUP_NAME="dba"
#dba应当是有效的安装用户所在组

FROM_LOCATION="/s01/media/oms/Disk1/stage/products.xml"
#FROM LOCATION指向安装介质stage目录下的products.xml文件

BASEDIR="/s01/app/gc"
#BASEDIR指向grid control安装的基础目录

INSTALLATION_NAME="oms10g"
#安装名

s_reposHost="rh3.oracle.com"
#repository数据库的主机名或ip地址

s_reposPort="1521"
#repository数据库的监听端口

s_reposSID="EMREP"
#repository数据库的sid

s_reposDBAPwd="maclean"
#repository数据库的sys用户密码

s_mgmtTbsName="/s01/orabase/oradata/EMREP/mgmt.dbf"
#repository数据库今后的mgmt表空间的数据文件名

s_ecmTbsName=s_mgmtTbsName="/s01/orabase/oradata/EMREP/mgmt_ecm.dbf"
#repository数据库今后的ecm表空间的数据文件名

s_securePassword="maclean"
#agent将来使用的secure密码

s_securePasswordConfirm="maclean"
#确认上一步的密码

b_lockedSelected=false
#确定agent交互是否被锁

s_reposPwd="maclean"
#确定仓库数据库中模式拥有者(sysman)的密码

s_reposPwdConfirm="maclean"
#确认上一步的密码

5.以静默方式安装grid control 10.2.0.1,但不配置oms:

[maclean@nas ~]$ export  TMP=/tmp

[maclean@nas ~]$  /s01/media/install/runInstaller -noconfig -silent -ignoreSysPrereqs -responseFile \
/s01/media/response/em_using_existing_db.rsp  use_prereq_checker=false b_skipDBValidation=true -force

以上安装完成后,运行相关脚本:
[maclean@nas ~]$ su - root -c "/home/maclean/oraInventory/orainstRoot.sh"

[maclean@nas ~]$ su - root -c "/s01/app/gc/oms10g/allroot.sh"

并使用opmonctl命令关闭http等服务:
[maclean@nas ~]$ /s01/app/gc/oms10g/opmn/bin/opmnctl stopall
opmnctl: stopping opmn and all managed processes...

5.接下来我们需要安装grid control 10.2.0.5补丁集,同样的需要修改一个response响应文件:

[maclean@nas 10205]$ unzip /tmp/gc_x86_64_10205_part2of2.zip
Archive:  /tmp/gc_x86_64_10205_part2of2.zip
extracting: p3731593_10205_Linux-x86-64.zip

[maclean@nas 10205]$ unzip p3731593_10205_Linux-x86-64.zip
..............

[maclean@nas ~]$ cp /s01/10205/3731593/Disk1/response/patchset.rsp /s01/10205/3731593/Disk1/response/oms_patchset.rsp

/* 对oms_patchset.rsp修改已有的参数为指定值 */

[maclean@nas ~]$ vi /s01/10205/3731593/Disk1/response/oms_patchset.rsp

ORACLE_HOME="/s01/app/gc/oms10g"
b_softwareonly=true
s_sysPassword="maclean"
sl_pwdInfo={ "maclean" }
oracle.iappserver.st_midtier:szl_InstanceInformation={ "maclean" }

ORACLE_HOME_NAME="oms10g"
#另外增加以上条目

[maclean@nas ~]$ /s01/10205/3731593/Disk1/runInstaller -noconfig -silent \
-responseFile /s01/10205/3731593/Disk1/response/oms_patchset.rsp

/* 以上10.2.0.5补丁安装完成后,同样需要执行root.sh */

[maclean@nas ~]$ su - root -c "/s01/app/gc/oms10g/root.sh"

6.完成上述安装后可以开始配置OMS了:

[maclean@nas ~]$ export PERL5LIB=/s01/app/gc/oms10g/perl/lib/5.6.1

[maclean@nas ~]$ /s01/app/gc/oms10g/perl/bin/perl /s01/app/gc/oms10g/sysman/install/ConfigureGC.pl \
/s01/app/gc
Base Directory: /s01/app/gc

 Starting ito execute Configuration Assistants: 

Running the configuration assistants using the following command:
/s01/app/gc/oms10g/oui/bin/runConfig.sh INV_PTR_LOC=/s01/app/gc/oms10g/oraInst.loc
ORACLE_HOME=/s01/app/gc/oms10g ACTION=configure MODE=perform
COMPONENT_XML={encap_oms.1_0_0_0_0.xml}
perform - mode is starting for action: configure

以上命令的具体形式为:
<OMS ORACLE_HOME>/perl/bin/perl <OMS ORACLE_HOME>/sysman/install/ConfigureGC.pl <Parent Directory filepath> 

配置会消耗大量的时间,建议通过.../oms10g/cfgtoollogs/oui/configActions<>.log.日志文件监控配置过程:

[root@nas oui]# cd /s01/app/gc/oms10g/cfgtoollogs/oui

[root@nas oui]# tail -f configActions2011-01-23_08-57-20-AM.log
... return status = 0 (success)
Oracle JAAS [Sun Jan 23 08:57:43 CST 2011]  $ORACLE_HOME/j2ee/home/config/jazn-data.xml is synchronized successfully to dcm repository.
Please check the log file [/s01/app/gc/oms10g/cfgtoollogs/jaznca.log] for details.

The plug-in Java Security Configuration Assistant has successfully been performed
------------------------------------------------------
------------------------------------------------------
The plug-in Web Cache Configuration Assistant is running

2
Start traversing...
got process-manager node
got ias-instance node
attrValue=IASPT

attrValue=DSA

attrValue=HTTP_Server

attrValue=LogLoader

attrValue=dcm-daemon

attrValue=OC4J

attrValue=WebCache

Entity found.

got ias-instance node
Current status is : enabled
Changing the value of port to enabled
 Modified ...
Before After WaitForComplete
After WaitForComplete
Completed smiSetStatus
Checking status ... enableconfiguration
In ... getWebcachePort
WebCache Default Port :7777
In ... updateApacheConf
Apache Port Value : 7777
Apache Before WaitForComplete
Apache After WaitForComplete
Checking for Apache updation status
Apache httpd.conf updated
smiTearDown
Will be checking the status ...
Webcache Configuration finished successfully

The plug-in Web Cache Configuration Assistant has successfully been performed
------------------------------------------------------
------------------------------------------------------
The plug-in Oracle Application Server Instance Configuration Assistant is running

The plug-in Oracle Application Server Instance Configuration Assistant has successfully been performed
------------------------------------------------------
------------------------------------------------------
The plug-in OC4J Instance Configuration Assistant is running

Reading ini file - '/s01/app/gc/oms10g/j2ee/deploy.ini'
Adding web-app 'IsWebCacheWorkingWeb.war' for app 'IsWebCacheWorking'.
Adding web-app 'wsrp-samples.war' for app 'portletapp'.
Initializing DCM...done.
OC4J instance 'home' already exists.
Starting OC4J instance 'home'...done.
Deploying application 'portletapp' to OC4J instance 'home'.
Notification ==> Application Deployer for portletapp STARTS [ 2011-01-23T08:58:00.972CST ]
Notification ==> Undeploy previous deployment
Notification ==> Removing files for app file:/s01/app/gc/oms10g/j2ee/home/applications/portletapp.ear
Notification ==> Copy the archive to /s01/app/gc/oms10g/j2ee/home/applications/portletapp.ear
Notification ==> Unpack portletapp.ear begins...
Notification ==> Unpack portletapp.ear ends...
Notification ==> Initialize portletapp.ear begins...
Notification ==> Initialize portletapp.ear ends...
Notification ==> Initialize wsrp-samples begins...
Notification ==> Initialize wsrp-samples ends...
Notification ==> deleting:  /s01/app/gc/oms10g/j2ee/home/applications/portletapp.ear
Notification ==> deleting:  /s01/app/gc/oms10g/j2ee/home/applications/portletapp/wsrp-samples.war
Notification ==> Application Deployer for portletapp COMPLETES [ 2011-01-23T08:58:01.319CST ] 

Deploying application 'IsWebCacheWorking' to OC4J instance 'home'.
Notification ==> Application Deployer for IsWebCacheWorking STARTS [ 2011-01-23T08:58:01.328CST ]
Notification ==> Undeploy previous deployment
Notification ==> Removing files for app file:/s01/app/gc/oms10g/j2ee/home/applications/IsWebCacheWorking.ear
Notification ==> Copy the archive to /s01/app/gc/oms10g/j2ee/home/applications/IsWebCacheWorking.ear
Notification ==> Unpack IsWebCacheWorking.ear begins...
Notification ==> Unpack IsWebCacheWorking.ear ends...
Notification ==> Initialize IsWebCacheWorking.ear begins...
Notification ==> Initialize IsWebCacheWorking.ear ends...
Notification ==> Initialize IsWebCacheWorkingWeb begins...
Notification ==> Initialize IsWebCacheWorkingWeb ends...
Notification ==> deleting:  /s01/app/gc/oms10g/j2ee/home/applications/IsWebCacheWorking.ear
Notification ==> deleting:  /s01/app/gc/oms10g/j2ee/home/applications/IsWebCacheWorking/IsWebCacheWorkingWeb.war
Notification ==> Application Deployer for IsWebCacheWorking COMPLETES [ 2011-01-23T08:58:01.362CST ] 

Calling updateConfig to notify DCM of new deployments...done.
Adding dependent libraries for application 'portletapp'...done.
Adding OC4J mount points for application 'portletapp'...done.
Adding OC4J mount points for application 'IsWebCacheWorking'...done.
Calling SMI to save changes.
SMISession.saveChanges succeeded.
Binding web app 'wsrp-samples' to default-web-site for application 'portletapp' in OC4J instance 'home'
Web app 'wsrp-samples' bound successfully.
Binding web app 'IsWebCacheWorkingWeb' to default-web-site for application 'IsWebCacheWorking' in OC4J instance 'home'
Web app 'IsWebCacheWorkingWeb' bound successfully.
Calling updateConfig to notify DCM of new web-bindings...done.
Adding application 'portletapp' to the DCM repository...done.
Application 'portletapp' deployed successfully.
Adding application 'IsWebCacheWorking' to the DCM repository...done.
Application 'IsWebCacheWorking' deployed successfully.
Stopping OC4J instance 'home'...done.
Calling SMI to retry init of failed plugins...done.
Terminating DCM...done.
Copying /s01/app/gc/oms10g/j2ee/deploy.ini to /s01/app/gc/oms10g/j2ee/deploy.ini.1295744298019.bak.
Writing any undeployed entries back to /s01/app/gc/oms10g/j2ee/deploy.ini.

Oc4jDeploy tool completed successfully!

The plug-in OC4J Instance Configuration Assistant has successfully been performed
------------------------------------------------------
------------------------------------------------------
The plug-in Register DCM Plug-Ins With EM is running

Operation successful.

The plug-in Register DCM Plug-Ins With EM has successfully been performed
------------------------------------------------------
------------------------------------------------------
The plug-in DCM Repository Backup Assistant is running

backup created: InstalledImage_EnterpriseManager0.nas

The plug-in DCM Repository Backup Assistant has successfully been performed
------------------------------------------------------
------------------------------------------------------
The plug-in EM Technology Stack Upgrade is running

The plug-in EM Technology Stack Upgrade has successfully been performed
------------------------------------------------------
------------------------------------------------------
The plug-in OMS Configuration is running

Operation Stopping OPMN Processes is in progress.
Operation EM Deploying is in progress.
Operation Creating OMS Respository is in progress.
Operation Configuring OMS is in progress.
OMS is being Secured and Lock is set to false.
Precompiling JSPs.
Performing installation of CLI services for client.
Operation Restarting OPMN Processes is in progress.

The plug-in OMS Configuration has successfully been performed
------------------------------------------------------
------------------------------------------------------
The plug-in Agent Configuration Assistant is running

Performing free port detection on host=nas
Securing the agent
Performing targets discovery and agent configuration

The plug-in Agent Configuration Assistant has failed its perform method
------------------------------------------------------
The action configuration has failed its perform method
###################################################

7.如果以上oms configuration顺利完成那么Grid Control的网页界面已经可以登录了,但我们在本地服务器上的agent仍是10.2.0.1版本的(所以Agent Configuration Assistant失败了),这里我推荐将原agent目录删除后通过10.2.0.5的agent介质(Linux_x86_64_Grid_Control_agent_download_10_2_0_5_0.zip)重新安装并部署,这样可以很大程度上避免出现问题。

如何在windows vista/2008/7中 安装Oracle OMS 即Grid Control

之前因为考试的原因,希望能在本机的windows上安装 Oracle OMS 以方便练习,OCM考试中使用的Grid Control 版本为10.2.0.1, 仅支持Windows相关系统号5,对于6或6.1的vista/2008/7安装过程中都会遇到问题无法解决,最为明显的是10.2.0.1自带数据库为10.1.0.4版本在windows相关版本号6以上的平台中均无法创建数据库。Oracle OCM考试中会要求你使用DBCA 建立一个干净的Customer定制数据库,仅需要建立必要的试图和过程(catalog.sql与catproc.sql运行过)并带有label security 组件(其他如Spatial与OLAP组建包括Oracle JVM等均不需要),如图:

labelsecurity

Oracle Grid Control 的10.2.0.5版本已经发布,其中10.2.0.4版本已支持最新的Windows操作系统,但只有patch install版本而无直接安装的full install 版本,且直接安装10.2.0.1 版本在OMS configuration部分将出错导致配置失败故我们需要另一种安装方式,如文档 ID:     763072.1

Installing On Windows 2008/Vista

The following sections discuss installing Enterprise Manager 10g Grid Control on Windows 2008/Vista.

Installing Enterprise Manager 10g Grid Control Using A New Database On Windows 2008/Vista

Enterprise Manager 10g Grid Control will not support the New Database install option on Windows 2008/Vista as the Database 10.1.0.4 (which is the default Database for Grid Control) is not supported for Windows 2008/Vista.

Installing Enterprise Manager 10g Grid Control Using an Existing Database On Windows 2008/Vista

To install Enterprise Manager 10g Grid Control using an existing database on Windows 2008/Vista, follow these steps:

  1. Download the fixed OUI 10204 from ARU Microsoft Windows (32-bit) (Bug 6640752) and extract it to a designated location, for example, C:OUI_Shiphome
  2. Copy Enterprise Manager 10g Grid Control 10.2.0.2.0 base shiphome (Disk1) into a location, for example, C:EMGC_102020shiphome
  3. Install the database that supports Vista/2008, such as 10.2.0.3.0/10.2.0.4. Make the following changes in the response file:

    C:EMGC_Shiphome102020shiphomeDisk1installresponseemnoseed.rsp

    1. Give the absolute path of products.xml for the FROM_LOCATION parameter.

      FROM_LOCATION="C:EMGC_102020shiphomeDisk1/oms/Disk1/stage/products.xml"

    2. Give the OMS Oracle Home location. For example:

      ORACLE_HOME=c:emnoseedoms10g

    3. Give the Oracle Home name. For example:

      ORACLE_HOME_NAME=oms10g12

    4. Give the Agent Oracle Home location. For example:

      s_agentHome=c:emnoseedagent10g

    5. Give the Agent Home Name. For example:

      s_agentHomeName=agent10g12

    Note:

    Ensure that the Oracle Home location and name are not identical to any previous Homes.

  4. Invoke the setup.exe for Install in the following way:

    C:OUI_ShiphomecdDisk1installsetup.exe -ignoreDiskLabel -responseFile C:EMGC_102020shiphomeDisk1installresponseemnoseed.rsp

  5. If the Agent is not coming up, and if the value of agentTZRegion in emd.properties is GMT then do the following:
    1. Reset TimeZone on Agent box to GMT.
    2. Execute the following command in <Oracle home of Agent>BIN>emctl resetTZ agent
  6. Patch OMS and Agent to version 10.2.0.5.

Installing An Additional Management Service On Windows 2008/Vista

Follow the below instructions to install an additional Management Service on Windows 2008/Vista.

  1. Download the fixed OUI 10204 from ARU Microsoft Windows (32-bit) (Bug 6640752) and extract it to a designated location, for example, C:OUI_Shiphome
  2. Copy Enterprise Manager 10g Grid Control 10.2.0.2.0 base shiphome (Disk1) into a location, for example, C:EMGC_102020shiphome
  3. Make the following changes in the response file:

    C:EMGC_102020shiphomeDisk1installresponseoms.rsp

    1. Supply the absolute path of products.xml for FROM_LOCATION parameter.

      FROM_LOCATION="C:EMGC_102020shiphome/Disk1/oms/Disk1/stage/products.xml"

    2. Supply the OMS Oracle Home location. For example: ORACLE_HOME=C:OH102020oms10g
    3. Specify the Oracle Home name. For example, ORACLE_HOME_NAME=oms10g20
    4. Supply the Agent Oracle Home location. For example, s_agentHome=C:OH102020agent10g
    5. Supply the Agent Home Name. For example, s_agentHomeName=agent10g20

    Note:

    Ensure that the Oracle Home location and name not be the same as any previous homes.

  4. Invoke the setup.exe for Install in the following way:

    C:OUI_ShiphomecdDisk1installsetup.exe -ignoreDiskLabel -responseFile

    C:EMGC_102020shiphomeDisk1installresponseoms.rsp

  5. If the Agent does not come up, and if the value of agentTZRegion in emd.properties is GMT, then do the following:
    1. Reset TimeZone on the Agent installation box to GMT
    2. Execute the following command in <Oracle home of Agent>BIN>emctl resetTZ agent
  6. Patch OMS and Agent to version 10.2.0.5.

Installing An Additional Management Agent On Windows 2008/Vista

Follow the below instructions to install an additional Management Agent on Windows 2008/Vista.

  1. Download the fixed OUI 10204 from ARU Microsoft Windows (32-bit) (Bug 6640752) and extract it to a designated location, for example, C:OUI_Shiphome
  2. Copy Enterprise Manager 10g Grid Control 10.2.0.2.0 base shiphome (Disk1) into a location, for example, C:EMGC_102020shiphome
  3. Make the following changes in the response file:

    C:EMGC_102020shiphomeDisk1installresponseagent.rsp

    1. Supply the absolute path of products.xml for FROM_LOCATION parameter.

      FROM_LOCATION="C:EMGC_102020shiphomeDisk1/oms/Disk1/stage/products.xml"

    2. Supply the OMS Oracle Home location. For example, ORACLE_HOME=c:agtagent10g
    3. Supply the Oracle Home name. For example, ORACLE_HOME_NAME=agent10g13

    Note:

    Ensure that Oracle Home location and name are not the same as any previous homes.

  4. Invoke the setup.exe for Install in the following way:

    C:OUI_ShiphomecdDisk1installsetup.exe -ignoreDiskLabel -responseFile

    C:EMGC_102020shiphomeDisk1installresponseagent.rsp

  5. If the Agent is not coming up, and if the value of agentTZRegion in emd.properties is GMT then do the following:
    1. Reset TimeZone on the Agent installation box to GMT.
    2. Execute the following command in <Oracle home of Agent>BIN>emctl resetTZ agent

Patch Agent to version 10.2.0.5.

沪公网安备 31010802001379号

TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569