Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2011
    Posts
    6

    Unanswered: Scipt to check the listeners status

    Hi can any on e please help me with the script.


    I need the script which should give the status of the databases (up or down), listeners status (up or down) with in a server. I have one for the database, can any one help me with listeners script.
    ################################################## #################
    ## ckinstance.ksh ##
    ################################################## #################
    ORATAB=/var/opt/oracle/oratab
    echo “`date` “
    echo “Oracle Database(s) Status `hostname` :\n”

    db=`egrep -i “:Y|:N” $ORATAB | cut -d”:” -f1 | grep -v “\#” | grep -v “\*”`
    pslist=”`ps -ef | grep pmon`”
    for i in $db ; do
    echo “$pslist” | grep “ora_pmon_$i” > /dev/null 2>$1
    if (( $? )); then
    echo “Oracle Instance – $i: Down”
    else
    echo “Oracle Instance – $i: Up”
    fi
    done

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    is GOOGLE broken for you?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Mar 2011
    Posts
    6
    Don't try to act smart. If you know try to share or else keep your mouth shut.

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    Mar 2011
    Posts
    6
    I have worked on it. I got it now.

    But always try to help and share ideas rather than being rude. I appreciate your response.

    Thanks,

  6. #6
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >I have worked on it. I got it now.
    Please post solution so other can benefit.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •