# DCgrid.ctl:410:Controls Grid Control Data Collection # $Id: DCgrid.ctl,v 1.17 2015/11/03 11:58:23 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/EM/DCgrid.ctl,v 1.17 2015/11/03 11:58:23 RDA Exp $ # # Change History # 20151102 KRA Add 'Node Manager Information' report. =head1 NAME EM:DCgrid - Collects Oracle Management Server and Repository Information =head1 DESCRIPTION This module collects Oracle Enterprise Manager (OMS) and Repository-related information. Some reports require that you install the EMDIAG kit. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing EM.GRID module ...',tput('off') # Initialization var $AUDIT_AGE = ${R_AUDIT_AGE/T:30} var $EMDIAG_IN_USE = ${B_EMDIAG_IN_USE} var $EMDIAG_OMSVFY = ${B_EMDIAG_OMSVFY_IN_USE} var $EMDIAG_OMSVFY_TOP = ${D_EMDIAG_OMSVFY_TOP:''} var $EMDIAG_REPVFY = ${B_EMDIAG_REPVFY_IN_USE} var $EMDIAG_REPVFY_TOP = ${D_EMDIAG_REPVFY_TOP:''} var $EMDIAG_TOP = ${D_EMDIAG_TOP:''} var $GRID_HOME = ${D_SERVER_HOME:''} var $NO_NAMES = or(isFiltered(),${B_NO_NAMES}) var $ORACLE_HOME = ${SET.RDA.BEGIN.D_ORACLE_HOME:''} var $PING_TEST = ${B_PING_TEST} var $TAIL = ${DFT.N_TAIL:1000} var $VIOLATION_AGE = ${R_VIOLATION_AGE/T:15} var $EMCTL = catCommand($GRID_HOME,'bin',${AS.BATCH:'emctl'}) var $MOD = cond(isUnix(),'fx','fr') var $OSN = getOsName() var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' var $WIN = or(isWindows(),isCygwin()) var $ERR = ' (error)' var $ADMIN = 'SYSMAN' var $PSEUDO = 'EM:GRID' var $NETSTAT = cond(isVms(),'tcpip netstat','netstat') if ${B_REQ_IREQ} {toc '0: * Enterprise Manager Server' toc '1+:Oracle Management Server Home' } else toc '1:Enterprise Manager Server' # Load the common macros run EM:EMdiag() run RDA:INVinfo() run RDA:library() # Get the 'hosts' file var $HOSTS = '/etc/hosts' if or(isCygwin(),isWindows()) {if ?${ENV.SYSTEMROOT} var $HOSTS = catFile($sys = last,'System32','drivers','etc','hosts') elsif isWindows() {var ($sys) = command('echo %SystemRoot%') if ?$sys var $HOSTS = catFile(last,'System32','drivers','etc','hosts') } } # Set the required environment var $bkp = setContext({PERL5LIB => ${ENV.PERL5LIB},\ PERL5OPT => ${ENV.PERL5OPT}}) # Determine the EM config home if ?testFile('fr',catFile($GRID_HOME,'sysman','config',\ 'emInstanceMapping.properties')) {var $pth = value(grepFile(lastFile(),'^[^#]*\bemgc\.properties\s*$','f')) var $prp = catFile(cond($WIN,s($pth,'^(\w+)\\:','$1:'),$pth)) var @dir = splitDir($prp) call splice(@dir,-3) var $EM_CFG_HOME = catDir(@dir) var $pth = value(grepFile($prp,'^[^#]*\bMW_HOME=','f')) var $MW_HOME = catDir(cond($WIN,s($pth,'^(\w+)\\:','$1:'),$pth)) var $pth = value(grepFile($prp,'^[^#]*\bEM_NODEMGR_HOME=','f')) var $NM_HOME = catDir(cond($WIN,s($pth,'^(\w+)\\:','$1:'),$pth)) } # Determine the version var $ver = undef if grepCommand(concat($EMCTL,' status oms'),'\sRelease\s','f') var ($ver) = match(last,'\s(\d+(\.\d+){3,})') if !$ver {if grepCommand(concat($EMCTL,' getversion oms'),'\sOMS Version\s','f') var ($ver) = match(last,'\s(\d+(\.\d+){3,})') } =head1 ORACLE MANAGEMENT SERVER HOME =head2 abbr_used - Abbreviations Displays the RDA abbreviations defined for data collection. =cut report abbr_used prefix {write '---+ Oracle Management Server Home Abbreviations' write '|*Abbreviation*|*Location*|' } var %hsh = getSymbols() loop $abr (keys(%hsh)) write '|',$abr,' |',$hsh{$abr},' |' if isCreated(true) toc '2:[[',getFile(),'][rda_report][Abbreviations]]' =head2 product_info - Product Information Produces the inventory for the Oracle Enterprise Manager Cloud Control 12c and later or Oracle Enterprise Manager Grid Control 11g and earlier home. =cut debug ' Inside GRID module, providing the OMS inventory (can take time)' report product_info if or(defined($EMDIAG_OMSVFY),defined($EMDIAG_REPVFY)) title '---+!! Cloud Control (OMS) Product Information' else title '---+!! GRID Control (OMS) Product Information' title '---## From ',encode($GRID_HOME),' ' title $TOC call inventory_details(catDir($GRID_HOME,'inventory'),${B_INTERIM}) if isCreated(true) toc '2:[[',getFile(),'][rda_report][Product Information]]' =head2 oms_bin - OMS Bin Files Displays the content of F directory (for version 12c and later). =cut if compare('VALID',$ver,'12') {debug ' Inside GRID module, collecting OMS bin directory content' report oms_bin prefix write '---+!! OMS Bin Files' call statDir('an',catDir($GRID_HOME,'bin')) if isCreated(true) toc '2:[[',getFile(),'][rda_report][OMS Bin Files]]' =head2 plugins - OMS Plug-in Files Displays the content of F directory (for version 12c and later). =cut debug ' Inside GRID module, collecting OMS plugins directory content' report plugins prefix write '---+!! OMS Plug-in Files' call statDir('an',catDir($MW_HOME,'plugins')) if isCreated(true) toc '2:[[',getFile(),'][rda_report][OMS Plug-in Files]]' } =for stopwords Omsvfy =head2 omsvfy - EMDIAG Omsvfy Detail Output Collects EMDIAG OMS verification results (for version 12c and later). =cut if $EMDIAG_OMSVFY {debug ' Inside GRID module, running omsvfy' report omsvfy if ?testFile('fx',catFile($EMDIAG_OMSVFY_TOP,'bin',${AS.BATCH:'omsvfy'})) {var $cmd = concat(lastTestCommand(),' verify all -level 9 -detail 2>&1') prefix {write '---+ EMDIAG Omsvfy Detail Output' write '---## Using: ',encode($cmd) } call writeCommand({cmd=>$cmd,\ env=>{EMDIAG_HOME=>$EMDIAG_OMSVFY_TOP,\ ORACLE_HOME=>$GRID_HOME}}) if isCreated(true) toc '2:[[',getFile(),'][rda_report][EMDIAG Omsvfy Detail Output]]' } # Collect kit log files if $EMDIAG_OMSVFY_TOP {if sameDir($EMDIAG_REPVFY_TOP,$EMDIAG_OMSVFY_TOP) {pretoc '2:EMDIAG Kit Log Files' var $kit = true } else pretoc '2:EMDIAG Omsvfy Kit Log Files' call sort_files(3,$TAIL,\ grepDir(catDir($EMDIAG_OMSVFY_TOP,'log'),'\.log$','np')) unpretoc } } =head2 no_access - No Repository Access Indicates whether the Oracle Enterprise Manager repository is not accessible. =for stopwords Repvfy =head2 not_found - No EMDIAG Repvfy Kit Indicates whether the EMDIAG Repvfy kit is not found (for version 12c and later). =head2 not_found - No EMDIAG Kit Indicates whether the EMDIAG kit is not found (for versions earlier than 12c). =head2 diagkit - EMDIAG Repvfy Kit Displays the information collected by the EMDIAG Repvfy kit. It generates this report only when the EMDIAG Repvfy kit is installed in the Enterprise Manager repository (for version 12c and later). =head2 diagkit - EMDIAG Kit Displays the information collected by the EMDIAG kit. It generates this report only when the EMDIAG kit is installed in the Enterprise Manager repository (for versions earlier than 12c). =head2 violations - Violation List Collects the diagnostic violation list. =head2 audit - Audit Log Lists all actions taken in the last days. =cut if or($EMDIAG_IN_USE,$EMDIAG_REPVFY) {# Determine the user and password if EMDIAG kit results are requested. var ($log,$sid) = () if compare('OLDER',$ver,'11') {var $log = nvl(get_em_login($GRID_HOME),'sysman') var $sid = get_em_conn($GRID_HOME) } if !$sid {loop $lin (grepCommand(concat($EMCTL,' config oms -list_repos_details'),\ '^Repository ')) {if match($lin,'^Repository Connect Descriptor') var (undef,$sid) = split('\s*:\s*',$lin,2) elsif match($lin,'^Repository User') var (undef,$log) = split('\s*:\s*',$lin,2) } if !$sid {if ?testFile('fr',$prp) {var $sid = replace(value(grepFile($prp,'^EM_REPOS_CONNECTDESCRIPTOR','f')),\ '\\','',true) var $log = value(grepFile($prp,'^EM_REPOS_USER','f')) } } } if derivePassword('Oracle',$sid,$log,'EM_REPOS_USER') call setPassword('host',$PSEUDO,$ADMIN,setPassword('Oracle',$sid,$log,\ askPassword("Enter ${VAR.log} user password:",''))) # Collect kit information debug ' Inside GRID module, collecting EMDIAG kit information' call setDbTarget({T_TYPE=>'Oracle',T_USER=>$log,T_SOURCE=>$sid}) if testDb() {report no_access write '**Repository database connection disabled**%BR%',getDbMessage() toc '2:[[',getFile(),'][rda_report][No Repository Access]]' } else {if check_emdiag_kit($ver) {# Get kit results call call_emdiag_kit($VIOLATION_AGE,$AUDIT_AGE,$ver,2) # Collect kit log files if and($EMDIAG_REPVFY_TOP,not($kit)) {if sameDir($EMDIAG_REPVFY_TOP,$EMDIAG_OMSVFY_TOP) pretoc '2:EMDIAG Kit Log Files' else pretoc '2:EMDIAG Repvfy Kit Log Files' call sort_files(3,$TAIL,\ grepDir(catDir($EMDIAG_REPVFY_TOP,'log'),'\.log$','np')) unpretoc } elsif $EMDIAG_TOP {pretoc '2:EMDIAG Kit Log Files' call sort_files(3,$TAIL,grepDir(catDir($EMDIAG_TOP,'log'),'\.log$','np')) unpretoc } } =head2 secstatus - OMS Secure Status Collects the OMS secure status from the repository =cut set $job {# SQL "SELECT '|' || " host_url || ' |' || " timestamp || ' |' || " value || ' |' " FROM (SELECT DISTINCT oms.host_url host_url, " oms.timestamp timestamp, " DECODE(oms.value,0,'Unsecured', " 1,'Secured and Unlocked', " 2,'Secured and Locked', " 'error:'||oms.value) value " FROM mgmt_oms_parameters oms, " (SELECT host_url, " name, " MAX(timestamp) last_time " FROM mgmt_oms_parameters " WHERE name = 'oms_secure_status' " GROUP BY host_url,name) s " WHERE oms.host_url = s.host_url " AND oms.timestamp = s.last_time " AND oms.name = s.name) " ORDER BY host_url "/ } debug ' Inside GRID module, getting OMS secure status information' report secstatus prefix {write '---+ OMS Secure Status' write '|*Host URL*|*Timestamp*|*Status*|' } call writeDb($job) if isCreated(true) toc '2:[[',getFile(),'][rda_report][OMS Secure Status]]' } } =for stopwords emctl =head2 emctl - emctl Command Output For version 12c and later, it collects the output of the following F command options: =over 4 =item o C =item o C =item o C =item o C =item o C =item o C =item o C =item o C =item o C =back For version 11g, it collects the output of the following F command options: =over 4 =item o C =item o C =item o C =item o C =item o C =item o C =item o C =item o C =item o C =item o C =back For earlier versions, it collects the output of the following F command options: =over 4 =item o C =item o C =item o C =item o C or C =back =cut debug ' Inside GRID module, collecting emctl information' report emctl if compare('OLDER',$ver,'11') {var @opt = ('getversion oms',\ 'status oms',\ 'status blackout',\ cond(compare('OLDER',$ver,'10.2.0.3'),'secure status oms',\ 'status oms -secure')) var @dsc = ('OMS version',\ 'Current OMS status',\ 'OMS blackout status',\ 'OMS secure status') var $cmd = exec_emctl($EMCTL,$ORACLE_HOME,\@opt,\@dsc) } else {# Generate the report if compare('VALID',$ver,'12') {var @opt = ('getversion oms',\ ['status oms -details'],\ ['list oms'],\ 'config oms -list_repos_details',\ ['list properties -module emoms'],\ ['list properties -module logging'],\ ['status emkey'],\ ['partool check'],\ 'dump omsthread') var @dsc = ('OMS version',\ 'OMS detail status',\ 'OMS list',\ 'Repository details',\ 'Module emoms properties',\ 'Module logging properties',\ 'Status emkey',\ 'Partool check',\ 'OMS thread dump') } else {var @opt = ('getversion oms',\ 'status oms',\ 'list oms',\ 'dump omsthread',\ 'config oms -list_repos_details',\ ['list properties -module emoms'],\ ['list properties -module logging'],\ ['status oms -details'],\ ['status emkey'],\ ['partool check']) var @dsc = ('OMS version',\ 'Current OMS status',\ 'OMS list',\ 'OMS thread dump',\ 'Repository details',\ 'Module emoms properties',\ 'Module logging properties',\ 'OMS detail status',\ 'Status emkey',\ 'Partool check') } var $cmd = exec_emctl($EMCTL,$ORACLE_HOME,\@opt,\@dsc) } =head2 netstat_port - EM Components Port Information Collects EM components port information using C command. =cut var %HST = () if ?testFile('f',catFile($GRID_HOME,'sysman','config',\ 'emInstanceMapping.properties')) {var $pth = value(grepFile(last,'^[^#]*\bemgc\.properties\s*$','f')) if ?testFile('f',catFile(cond($WIN,s($pth,'^(\w+)\\:','$1:'),$pth))) {# Determine the ports from emgc.properties file var %cfg = () if createBuffer('CFG','R',lastFile()) {loop $lin (grepBuffer('CFG','^(((EM_(CONSOLE|UPLOAD)_HTTP(S)?)|\ (AS|MS)_HTTPS|EM_NODEMGR)_PORT|EM_INSTANCE_HOST|EM_WEBTIER_INSTHOME|\ OHS_COMP_NAME)=')) var $cfg{key($lin)} = value($lin) call deleteBuffer('CFG') } # Determine the ports from instance location if ?$ins = $cfg{'EM_WEBTIER_INSTHOME'} {var $ins = cond($WIN,s($ins,'^(\w+)\\:','$1:'),$ins) # Determine the ports from opmn.xml file if ?testFile('f',catFile($ins,'config','OPMN','opmn','opmn.xml')) {var $obj = xmlLoadFile(last,xmlDisable(xmlParser(),'DR')) if xmlFind($obj,'opmn/notification-server/port') {var ($xml) = last var $cfg{'OPMN_LOCAL_PORT'} = xmlValue($xml,'local') var $cfg{'OPMN_REMOTE_PORT'} = xmlValue($xml,'remote') } } # Determine the ports from admin.conf file if ?testFile('f',catFile($ins,'config','OHS',\ $cfg{'OHS_COMP_NAME'},'admin.conf')) {if grepFile(last,'^Listen\s+(\d+)$','f1') var $cfg{'OHS_LISTEN_PORT'} = first } # Determine the host name from httpd_em.conf file if ?testFile('f',catFile($ins,'config','OHS',\ $cfg{'OHS_COMP_NAME'},'httpd_em.conf')) {if grepFile(last,'^\s*ServerName\s+(\S+)','f1') var $HST{'SLB Host Name'} = first } } var $HST{'EM Instance Host Name'} = $cfg{'EM_INSTANCE_HOST'} delete $cfg{'EM_INSTANCE_HOST'},$cfg{'EM_WEBTIER_INSTHOME'},\ $cfg{'OHS_COMP_NAME'} # Extract the information from the netstat output var $pgm = concat($NETSTAT,cond(isVms(),cond($NO_NAMES,' "-an"',' "-a"'),\ cond($NO_NAMES,' -an',' -a'))) if loadCommand($pgm) {debug ' Inside GRID module, collecting EM components port information' report netstat_port title '---+!! EM Components Port Information' title '---## Using: ',encode($pgm) title $TOC loop $key (keys(%cfg)) {next !?$prt = isPort($cfg{$key},true) prefix {write '---++ Port: ',$prt,' (',$key,')' call beginBlock(true) } if grepLastFile($prt,'f') write cond(isFiltered(),replace(last,'\d+(\.\d+){3}','%R:IP4%',true),\ last) if hasOutput(true) {call endBlock() write $TOP } } if isCreated(true) toc '2:[[',getFile(),'][rda_report][EM Components Port Information]]' } } } =head2 dns_info - Domain Name Resolution Displays the output of the C test performed on the OMS server. =cut debug ' Inside GRID module, performing nslookup test' var $HST{'OS Host Name'} = ${RDA.T_HOST} if ?testFile('f',check($OSN,\ 'aix', '/usr/bin/nslookup',\ 'hpux', '/bin/nslookup',\ 'linux', '/usr/bin/nslookup',\ 'solaris','/usr/sbin/nslookup',\ cond(defined($sys),catFile($sys,'System32','nslookup.exe')))) {var $pgm = lastTestCommand() report dns_info title '---+!! Domain Name Resolution Information' title $TOC loop $ttl (keys(%HST,'KD')) {next !length($str = $HST{$ttl}) title '---+ ',$ttl if ?isHostName($str,true) call check_dns($pgm,last,'Forward') elsif ?isIP($str,true) call check_dns($pgm,last,'Reverse') } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Domain Name Resolution]]' } =head2 ping_test - OMS Ping Test Displays the output of the ping test performed on the OMS server. =cut debug ' Inside GRID module, performing ping tests' call ping_host('OMS Ping Test',values(%HST,'KD')) =head2 hosts - OMS Server Host Extracts OMS server host name entries from the F file. =cut debug ' Inside GRID module, extracting OMS host name entries from hosts file' if ?testFile('f',$HOSTS) {report hosts title '---+!! OMS Server Host Information' title '---## Information extracted from ',encode($HOSTS),' File' title $TOC loop $hst (values(%HST,'KD')) {prefix {write '---+ Host ',$hst call beginBlock(true) } loop $lin (grepFile($HOSTS,concat('^[^#]*\s',verbatim($hst),'(\s|\z)'))) write $lin if hasOutput(true) {call endBlock() write $TOP } } if isCreated(true) toc '2:[[',getFile(),'][rda_report][OMS Server Host]]' } =head2 Node Manager Information Gathers the Node Manager configuration and log files information (for version 11g and later). =cut if ?testDir('d',$NM_HOME) {debug ' Inside GRID module, gathering node manager config and log files' pretoc '2:Node Manager Information' # Gather the node manager configuration files pretoc '3:Configuration Files' call skip_files(catFile($NM_HOME,'nm_data.properties')) call sort_files(4,0,grepDir($NM_HOME,'\.log\d*$','npv')) unpretoc # Gather the node manager log files pretoc '3:Log Files' call sort_files(4,$TAIL,grepDir($NM_HOME,'\.log\d*$','np')) unpretoc 2 } =head2 oms_config - OMS Configuration Collects the following configuration files: =over 24 =item F This file contains all the operational parameters for the Oracle Management Server (for versions earlier than 11g). =item F This file contains the logging setup for the Java fetchlets (for versions earlier than 11g). =item F This file contains the list of all Oracle Universal Installer inventories on the machine to be considered by the agent. =item F This file contains the time stamp of the last heartbeat to the Oracle Management Server. =item F This file contains a list of all discovery scripts that must be run for discovery. Discovery is run only once, typically during the installation of the Enterprise Manager Agent. =item F This file contains virtual hosts and other directives required for the Enterprise Manager Central Console to function correctly. =item F This file has information about categories properties computed for various targets. =item F This file contains the names of all supported time zones. =item F This file contains the version-specific information of the Oracle Management Server, which is required by the agent to communicate properly. =item F This file is generated by Oracle Universal Installer during the installation of the Enterprise Manager Agent. It contains installation-specific information. =item F This file contains the names of all supported time zones. =item F This file contains supported time zone mappings. =back It performs some predefined tests on the configuration properties also. It reports failures. =cut debug ' Inside GRID module, collecting Grid Control configuration' if $EM_CFG_HOME {pretoc '2:OMS Configuration' var @lst = grepDir(catDir($EM_CFG_HOME,'em'),'^emgc\.properties$','r',1) } else {call display_oms_config($GRID_HOME,\@cfg,\@log) var @lst } call skip_files(\ catFile($GRID_HOME,'sysman','config','emoms.properties'),\ catFile($GRID_HOME,'sysman','config','emomslogging.properties')) call sort_files(3,$TAIL,\ catFile($GRID_HOME,'sysman','setupinfo.txt'),\ catFile($GRID_HOME,'sysman','admin','nsupportedtzs.lst'),\ catFile($GRID_HOME,'sysman','admin','supportedtzs.lst'),\ catFile($GRID_HOME,'sysman','admin','tzmappings.lst'),\ catFile($GRID_HOME,'sysman','admin','discover','discover.lst'),\ catFile($GRID_HOME,'sysman','config','httpd_em.conf'),\ catFile($GRID_HOME,'sysman','config','httpd_em.conf.template'),\ grepDir(catDir($GRID_HOME,'sysman','config'),'\.properties$','np'),\ grepDir(catDir($GRID_HOME,'sysman','emd'),'\.(ini|xml)$','np'),\ @lst) if $EM_CFG_HOME unpretoc =head2 thread_dump - Thread Dump Displays the thread dump for the Oracle Manager Server Java process. It takes two thread dumps at an interval of 3 minutes. It produces this report when the C option is available. This option was added to the 10.2 version. This test is not performed on the 11g version or later. =cut if and($cmd,compare('OLDER',$ver,'11'),grepCommand($cmd,'omsthread','f')) {debug ' Inside GRID module, collecting a OMS thread dump (takes 3 minutes)' call dump_oms_threads(concat($cmd,' dump omsthread'),\ catFile($GRID_HOME,'opmn','logs','OC4J~OC4J_EM~default_island~1')) } =head2 file_permissions - OMS Upload Receive File/Directory Details Displays the details of the Oracle Manager Server receive directory and Oracle Manager Server receive errors directory, where Enterprise Manager stores all agent uploads before their upload in the repository. It checks the directory ownership also (for versions earlier than 12c). =cut if compare('OLDER',$ver,'12') {debug ' Inside GRID module, collecting receive directory details' var (@own,%dir,%fil) = () if ?testDir('d',catDir($GRID_HOME,'sysman','recv')) {var $dir{lastDir()} = 'o' if ?testDir('dr',catDir($GRID_HOME,'sysman','recv','errors')) var $dir{lastDir()} = 'o' } elsif $EM_CFG_HOME {var $dir = catDir($EM_CFG_HOME,'em') loop $sub (grepDir($dir,'.','n')) {if ?testDir('d',catDir($dir,$sub,'sysman','recv')) {var $dir{lastDir()} = 'o' if ?testDir('dr',catDir($dir,$sub,'sysman','recv','errors')) var $dir{lastDir()} = 'o' } } } call check_permissions('OMS Upload Receive File/Directory Details',\ \@own,\%dir,\%fil) =head2 ping_test - Agent Ping Test When requested, the module performs a ping test to a specified host list (for versions earlier than 12c). =cut if $PING_TEST {debug ' Inside GRID module, performing ping tests' call ping_host('Agent Ping Test',@{T_PING_LIST}) } =head2 log_errors - Log Errors Filters all the lines with C message from various Oracle Manager Server log files (for versions earlier than 12c). =cut debug ' Inside GRID module, extracting errors from OMS log files' if $EM_CFG_HOME {var @fil = () loop $sub (findDir(catDir($EM_CFG_HOME,'em'),'^sysman$','ir',1)) call push(@fil,grepDir(catDir($sub,'log'),'^emagent_memDump','npv')) call extract_errors('log_errors',2,'Log Errors',$TAIL,@fil) } else call extract_errors('log_errors',2,'Log Errors',$TAIL,\ grepDir(catDir($GRID_HOME,'sysman','log'),'^emagent_memDump','npv')) =head2 apachelog - Apache Logs Displays the content of F directory (for versions earlier than 12c). =cut report apachelog debug ' Inside GRID module, collecting apache logs directory content' prefix write '---+!! Apache Logs' call statDir('t',catDir($GRID_HOME,'Apache','Apache','logs')) if isCreated(true) toc '2:[[',getFile(),'][rda_report][Apache Logs]]' } =head2 Log Files Collects the Grid Control log files. =cut debug ' Inside GRID module, collecting OMS log files' pretoc '2:Log Files' call sort_files(3,$TAIL,\ grepDir(catDir($GRID_HOME,'sysman','log'),'\.nohup$','np'),\ grepDir(catDir($GRID_HOME,'j2ee','OC4J_EM','log',\ 'OC4J_EM_default_island_1'),'.','np'),\ grepDir(catDir($GRID_HOME,'sysman','log'),'\.(log|trc)$','np'),\ grepDir(catDir($GRID_HOME,'sysman','log'),'^emoms\.(log|trc)\.\d+$','np'),\ grepDir(catDir($GRID_HOME,'sysman','log','schemamanager'),\ '\.(log|trc)$','np')) if $EM_CFG_HOME {loop $sub (findDir(catDir($EM_CFG_HOME,'em'),'^sysman$','dir',1)) {if ?testDir('d',catDir($sub,'log')) call sort_files(3,$TAIL,grepDir(lastDir(),'\.(log|trc)$','np'),\ grepDir(lastDir(),'^emoms\.(log|trc)\.\d+$','np')) } } unpretoc =head2 Agent Push Log Files Collects the Cloud Control agent push log files (for version 12c and later). =cut if compare('VALID',$ver,'12') {var ($dir,@tbl) = (catDir($GRID_HOME,'sysman','prov','agentpush')) if ?testDir('d',$dir) {debug ' Inside GRID module, collecting OMS agent push log files' call push(@tbl,grepDir(catDir($dir,'logs'),'^\.+$','pv')) loop $sub (findDir($dir,'^\d{4}(-\d{2}){2}_(\d{2}-){3}[AP]M$','ip')) call push(@tbl,\ grepDir(catDir($sub,'applogs'),'^\.+$','rv'),\ grepDir(catDir($sub,'logs'),'^\.+$','rv'),\ grepDir(catDir($sub,'prereqlogs','emagent_clone_logs'),'^\.+$','rv'),\ grepDir(catDir($sub,'prereqlogs','emagent_install_logs'),'^\.+$','rv'),\ grepDir(catDir($sub,'prereqlogs','nfs_install_logs'),'^\.+$','rv'),\ grepDir(catDir($sub,'prereqlogs','productprereq_logs'),'^\.+$','rv')) if @tbl {pretoc '2:Agent Push Log Files' call sort_files(3,$TAIL,@tbl) unpretoc } else {report no_agentpush write '**No EM Cloud Management Agent pushed from this OMS**' toc '2:[[',getFile(),'][rda_report][Agent Push Log Files]]' } } } =for stopwords cfgtoollogs =head2 Grid cfgtoollogs Files Collects Grid home cfgtoollogs Files =cut debug ' Inside GRID module, collecting Grid cfgtoollogs files' pretoc '2:Cfgtoollogs Files' call sort_files(3,undef,\ grepDir(catDir($GRID_HOME,'cfgtoollogs'),'.','np'),\ grepDir(catDir($GRID_HOME,'cfgtoollogs','cfgfw'),'\.log$','np'),\ grepDir(catDir($GRID_HOME,'cfgtoollogs','oui'),'\.(err|log|out)$','np'),\ grepDir(catDir($GRID_HOME,'cfgtoollogs','opatch'),'\.(log|txt)$','np')) unpretoc =head2 omscafiles - OMS Configuration Assistant Files Collects OMS configuration assistant files (for version 12c and later). =cut if compare('VALID',$ver,'12') {debug ' Inside GRID module, collecting OMS configuration assistant files' report omscafiles var $dir = catDir($GRID_HOME,'cfgtoollogs','omsca') prefix {write '---+!! OMS Configuration Assistant Files' write '---## From: ',$dir write ' * Links point to files that have been collected in their original \ format. Opening them directly in your browser can present \ risks. To prevent them, access the file outside the browser or \ use the link to save them and use an adequate viewer.' write ' * Last ',$TAIL,' lines captured from the files' write '|*File Name*| *Size*|*Last Modified Date*|' } loop $fil (grepDir($dir,'^[^\.]','pt')) {var $lnk = encode($fil) var $siz = getSize($fil) if $siz {output => d,concat('ca_',basename($fil)) if ${CUR.O_LAST}->write_tail($fil,$TAIL) var $lnk = concat('[[',${CUR.O_LAST}->get_raw(true),'][_blank][',$lnk,']]') end ${CUR.O_LAST} } write '|',$lnk,' | ',$siz,'|',getLastModify($fil,''),' |' } if isCreated(true) toc '2:[[',getFile(),'][rda_report][OMS Configuration Assistant Files]]' =head2 plugincafiles - OMS Plug-in Configuration Assistant Files Collects OMS plugin configuration assistant files (for version 12c and later). =cut debug ' Inside GRID module, collecting OMS plugin config assistant files' pretoc '2:OMS Plug-in Configuration Assistant Files' loop $dir (\ catDir($GRID_HOME,'cfgtoollogs','pluginca'),\ findDir(catDir($MW_HOME,'plugins'),'^cfgtoollogs$','nr',1)) {output F,plugincafiles prefix {write '---+!! OMS Plug-in Configuration Assistant Files' write ' * Links point to files that have been collected in their original \ format. Opening them directly in your browser can present \ risks. To prevent them, access the file outside the browser or \ use the link to save them and use an adequate viewer.' write ' * Last ',$TAIL,' lines captured from the files' write '|*File Name*| *Size*|*Last Modified Date*|' } loop $fil (grepDir($dir,'^[^\.]','rt',1)) {var $lnk = encode($fil) var $siz = getSize($fil) if $siz {output => d,concat('pluginca_',basename($fil)) if ${CUR.O_LAST}->write_tail($fil,$TAIL) var $lnk = concat('[[',${CUR.O_LAST}->get_raw(true),'][_blank][',$lnk,']]') end ${CUR.O_LAST} } write '|',$lnk,' | ',$siz,'|',getLastModify($fil,''),' |' } if isCreated(true) toc '3:[[',getFile(),'][rda_report][From ',encode($dir),']]' } unpretoc } =head2 OMS Miscellaneous Files Collects various files. Some of the important files are as follows: =over 16 =item F This file specifies the list of special integration classes to be loaded when the Enterprise Manager application starts. These integration classes define and shape which special pages and features are enabled for the various target types. =item F This file contains OPMN settings. =item F This file contains specific settings for the OC4J application. =item F This file contains specific settings for the UIX Web pages including supported languages. =item F This file contains specific settings for the user interface. =back =cut debug ' Inside GRID module, collecting miscellaneous OMS files' pretoc '2:Miscellaneous Files' call sort_files(3,undef,\ grepDir(catDir($GRID_HOME,'Apache','Apache','conf'),'.conf$','np'),\ grepDir(catDir($GRID_HOME,'config'),'.','np'),\ grepDir(catDir($GRID_HOME,'chgip','config'),'.','np'),\ grepDir(catDir($GRID_HOME,'chgip','log'),'.','np'),\ grepDir(catDir($GRID_HOME,'chgip','scripts'),'.','np'),\ grepDir(catDir($GRID_HOME,'dcm','config'),'.','np'),\ grepDir(catDir($GRID_HOME,'dcm','logs'),'^log.xml$','dir'),\ grepDir(catDir($GRID_HOME,'install'),'.','np'),\ catFile($GRID_HOME,'inventory','Scripts','ext','lib','oneclick.properties'),\ catFile($GRID_HOME,'j2ee','OC4J_EM','application-deployments','em','em',\ 'orion-web.xml'),\ catFile($GRID_HOME,'j2ee','OC4J_EM','applications','em','em',\ 'WEB-INF','uix-config.xml'),\ catFile($GRID_HOME,'j2ee','OC4J_EM','applications','em','em',\ 'WEB-INF','web.xml'),\ grepDir(catDir($GRID_HOME,'opmn','logs'),'.','np'),\ grepDir(catDir($GRID_HOME,'opmn','conf'),'\.(conf|xml)$','np')) unpretoc =head1 COMMON HOME INFORMATION Includes the reports generated by the L module about the common home. =cut toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle Common Oracle Home")%' toc '%INCLUDE("OFM_IREQ_EM_GRID_CH_TF.toc")%' toc '%POP2%' =head1 WEB TIER INFORMATION Includes the reports generated by the L module about the Oracle instance and its associated Oracle home. =cut toc '%PUSH("%SPLIT%")%' toc '%PUSH("0: * Oracle WebTier Instance")%' toc '%PUSH("1++:WebTier Oracle Home")%' toc '%INCLUDE("OFM_IREQ_EM_GRID_OH_TF.toc",1)%' toc '%POP%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:Instance Home")%' toc '%INCLUDE("OFM_IREQ_EM_GRID_OI_TF.toc")%' toc '%POP4%' =head1 ORACLE WEBLOGIC SERVER INFORMATION Includes the Oracle WebLogic reports generated by the L module. =cut toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("OFM_WREQ_EM_GRID_WH_TF.toc")%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Domain")%' toc '%INCLUDE("OFM_WREQ_EM_GRID_DOM_TF.toc")%' toc '%POP2%' # Restore the previous environment call restoreContext($bkp) =head1 HCVE When requested, performs the postinstallation checks (for version 12c and later). =cut if and(${B_HCVE_CHECKS},compare('VALID',$ver,'12')) {debug ' Inside GRID module, executing the postinstallation checks' # Initialize HCVE input values var ${RUN.HCVE.OEM.OMS.T_HOME} = $GRID_HOME test TOOL:TLhcve('EM:Poms121_gen') } =head1 SEE ALSO L, L, L, L, L, L =begin credits =over 10 =item RDA 4.7: Werner De Gruyter. =item RDA 4.9: Smitha Nath. =item RDA 4.16: Eliane Papillon Le Noc. =item RDA 4.18: Eliane Papillon Le Noc, David Parker. =item RDA 4.19: David Parker. =item RDA 4.21: Eliane Papillon Le Noc. =item RDA 4.22: David Parker. =item RDA 4.26: Laurence De Sulzer Wart, Eliane Papillon Le Noc. =item RDA 4.27: Eliane Papillon Le Noc. =item RDA 4.28: Laurence De Sulzer Wart. =item RDA 4.30: Laurence De Sulzer Wart, Eliane Papillon Le Noc. =item RDA 4.31: Laurence De Sulzer Wart, Eliane Papillon Le Noc. =item RDA 8.00: Laurence De Sulzer Wart. =item RDA 8.02: Laurence De Sulzer Wart. =item RDA 8.09: Eliane Papillon Le Noc. =item RDA 8.10: Jayatheertha Hanumantha Rao. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. =head1 TRADEMARK NOTICE Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. =cut