Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009

    Unanswered: RAC: Check Health of Nodes

    I have tried a number of ways to do this and have met a brick wall with each method I've tried. Here's what I'm trying to do:

    We have a monitoring tool from which we can run scripts. I ultimately want to know there are X, Y, and Z servers configured to support a given service, and right now X, and Y are up (or Z is down).

    I can get all of the nodes running a service with the following:

    select a.host_name
    from gv$instance a, gv$active_services s
    where a.inst_id = s.inst_id
    and = '{service_name}';
    ... but this does not tell me if there are nodes offline.

    The solution can be shell, SQL, or a combination of both - but if I had my preference it would be pure SQL.

    Any ideas or has anyone else solved this?

  2. #2
    Join Date
    May 2004
    Dominican Republic
    You can obtain a combination of services/hosts status with

    crs_stat -t

    That will print you a list of available services per host with status (mostly ONLINE/OFFLINE). You can grep/sed this output with your own needs.

  3. #3
    Join Date
    Feb 2009
    Thanks for the reply JMartinez.

    My problem with that approach is knowing to which node to make the connection ... I have 6 nodes in a prod cluster and if I arbitrarily pick one and it happens to be down, all of my points would show as down (an outage instead of a warning), even if the other 5 were healthy.

    What I ended up doing is doing a connection to the service name, pulling the hostname from sys_context (as I know that host at least has to be running) and then issuing a remote command on that host to do the crs_stat with some grep and awk goodness to sort out what it is I need.

    I just really thought there had to be a way to get the node information from within the database, but this will work for now.

Posting Permissions

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