# DCexl.cfg: Collects Oracle Exalogic Information # $Id: DCexl.cfg,v 1.9 2014/01/31 16:56:46 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/DCexl.cfg,v 1.9 2014/01/31 16:56:46 RDA Exp $ # # Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. # # Change history # 20140130 KRA Provide an option to pass nodes through command line. ############################################################################### # Collect the Oracle Exalogic Setup Information ############################################################################### #------------------------------------------------------------------------------ # Module definition #------------------------------------------------------------------------------ col=${B_IN_USE} dsc='Collects Oracle Exalogic Information' pre=RDA:DCbegin rpt=B_IN_USE var=not_used # Flow:in_use,B_IN_USE exe=sdcl { "if ?nvl(testFile('f','/usr/lib/init-exalogic-node/.image_id'),\ " testDir('d','/opt/exalogic.tools')) " var @{AUX.var} = (cond(${PRF.B_TESTS},'in_use','B_IN_USE')) } #------------------------------------------------------------------------------ # Setting definitions #------------------------------------------------------------------------------ [in_use] typ=B dft=true dsc='Is Oracle Exalogic in use?' nam=B_IN_USE var=chk_profile,N_TAIL,ssh_comment [not_used] typ=B dft=false dsc='Is Oracle Exalogic in use?' nam=B_IN_USE [B_IN_USE] typ=B dft=${AUX.B_SELECTED} dsc='Is Oracle Exalogic in use?' inp='Do you want RDA to collect Oracle Exalogic information (Y/N)?' var=true:chk_profile,N_TAIL,ssh_comment [chk_profile] typ=B dft=defined(${PRF.T_TYPE}) dsc='Profile based variable exists?' nam=- var=true:get_type,chk_type:\ T_TYPE,chk_type [get_type] typ=T dft=${PRF.T_TYPE} dsc='Collection type' nam=T_TYPE [T_TYPE] typ=M bef='Exalogic collection type:' dft='^' dsc='Collection type' err="Enter a number from 1 to ${AUX.N_ITEMS}" inp='Enter the number corresponding to the collection type' itm=['_All_' =>'All diagnostic information',\ '_DriveFailure_' =>'Drive failure issue',\ '_Gateway_' =>'Gateway issue',\ '_HealthHwSw_' =>'Hardware and Software health issue',\ '_HealthNetwork_' =>'Network health issue',\ '_IbFabric_' =>'IB fabric issue',\ '_IbSwitch_' =>'IB switch issue',\ '_Ilom_' =>'ILOM issue',\ '_Network_' =>'General network issue',\ '_Patch_' =>'Image patches issue',\ '_Raid_' =>'RAID card issue',\ '_Temp_' =>'Ambient temperature issue'] val=E [chk_type] typ=T dft=${T_TYPE} dsc='Apply the type-related setup' nam=- var=_All_:B_COLLECT_NODE,B_COLLECT_SWITCH:\ _DriveFailure_:B_COLLECT_NODE:\ _Gateway_:B_COLLECT_SWITCH:\ _HealthHwSw_:B_COLLECT_NODE:\ _HealthNetwork_:B_COLLECT_NODE:\ _IbFabric_:B_COLLECT_NODE:\ _IbSwitch_:B_COLLECT_SWITCH:\ _Ilom_:B_COLLECT_NODE:\ _Network_:B_COLLECT_NODE:\ _Patch_:B_COLLECT_NODE:\ _Raid_:B_COLLECT_NODE:\ _Temp_:B_COLLECT_NODE [B_COLLECT_NODE] typ=B dft=true dsc='Should we collect diagnostic information from remote nodes?' inp='Do you want to collect diagnostic information from remote nodes (Y/N)?' lvl=6 var=true:T_NODES,T_NODE_LOGIN,N_NODE_WAIT_PWD [T_NODES] typ=M ask=0 bef='Exalogic node list:' col=1 dft='*' dsc='Node list' itm=[@{T_TMP_ITM_NODES}] pck=true val=E exe=sdcl { "var @itm = () "if ${T_NODES/E} "{loop $nod (@{T_NODES}) " call push(@itm,$nod,$nod) "} "elsif loadCommand('/usr/sbin/ibnodes') "{var %nod = () " loop $nod (grepLastFile('\"(.*?)\sEL-C\s.*?\"','1')) " {next match($nod,'^\s*$') " var $nod{join(".",$nod,${RDA.T_DOMAIN})} = 1 " } " loop $nod (keys(%nod)) " {next compare('eq',$nod,${RDA.T_HOST}) " call push(@itm,$nod,$nod) " } "} "var @{T_TMP_ITM_NODES/T} = @itm } [T_NODE_LOGIN] typ=T dft='oracle' dsc='User to log in as on remote nodes' err='Invalid user name' inp='Enter the user to login as on remote nodes' ref=defined(isUser(last,true)) val=E [N_NODE_WAIT_PWD] typ=N dft=30 dsc='Number of seconds to wait between password prompts for nodes' err='The number of seconds must be an integer greater than zero' inp='Enter the number of seconds to wait between password prompts for \ connecting to nodes' lvl=6 ref='I]0,[' val=F [B_COLLECT_SWITCH] typ=B dft=true dsc='Should we collect switch information using remote connection?' inp='Do you want to collect switch information using remote connection (Y/N)?' lvl=6 var=true:T_SWITCH_LOGIN,N_SWITCH_WAIT_PWD,chk_user [T_SWITCH_LOGIN] typ=T dsc='User to log in as on remote switches' err='Invalid user name' inp='Enter the user to login as on remote switches' ref=defined(isUser(last,true)) val=E [N_SWITCH_WAIT_PWD] typ=N dft=30 dsc='Number of seconds to wait between password prompts for switches' err='The number of seconds must be an integer greater than zero' inp='Enter the number of seconds to wait between password prompts for \ connecting to switches' lvl=6 ref='I]0,[' val=F [chk_user] typ=B dft=${CUR.N_UID} dsc='Check if it is root user' fam=Unix nam=- var=true:switch_comment [switch_comment] typ=C dsc='Report to execute TLroot to complete the collection' fam=Unix inp="WARNING: Collecting switch information requires superuser privileges.\n\n\ When the normal collection is complete, switch to root and execute the \ TLroot tool with a command like:\n\ \040\040${RDA.T_SHORT} -vT root\n\ Next, switch back to the previous user to package the results with a \ command like:\n\ \040\040${RDA.T_SHORT} -vP\n\n\ Hit 'Return' to continue" [N_TAIL] typ=N dft=1000 dsc='Default number of lines to be collected from log files' err='The number of lines must be an integer greater than zero' inp='Enter the default number of lines to be collected from log files' lvl=9 ref='I]0,[' val=F [ssh_comment] typ=C dsc='Report to execute ssh manually before RDA' fam=Unix inp="NOTE: Collecting remote information requires ssh connection.\n\n\ Take care that RDA does not perform the first connection to a remote \ host. Run first ssh manually to verify the remote's host finger print \ and to accept connecting to it.\n\n\ Hit 'Return' to continue"