Search This Blog

Total Pageviews

Monday, 4 July 2022

crsctl status






more script 
https://github.com/freddenis/oracle-scripts/blob/master/rac-status.sh 






./crsstatus.sh

#!/bin/sh

CRS_HOME=/u01/app/19.0.0/grid
#$CRS_HOME/bin/crsctl stat res -t -init\

$CRS_HOME/bin/crsctl stat res -t \
  | awk -v t="$t" '$0 !~ "Cluster Resources" && $0 !~ "Local Resources" \
      { \
        if ($0 ~ "Name") { \
          printf "%-45s %-10s %-15s %-14s %s %s\n", $1, $2, $3, $4, $5, $6
          while (++k <= 120) { \
            printf("-") \
          } \
          printf ("\n") \
        } \
        if (NF == 1) {\
          rs=$0 \
        } \
        else if (NR != 2) { \
          if ($1 ~ "^[0-9]") { \
            if ($0 ~ "Shutdown" || (rs ~ "svc$" && $3 == "OFFLINE" )) { \
              l = "$CRS_HOME/olsnodes -n"
              cmd[NR] = l
              while (l | getline line) {
                split(line,r," ")
                if (r[2] == $1) {
                  NODE = r[1]
                }
              }
              printf "%-45s %-10s %-15s %-14s %s %s\n", rs, $2, $3, NODE, $4, $5, "", $6, $7 \
            } \
            else { \
              printf "%-45s %-10s %-15s %-14s %s %s\n", rs, $2, $3, $4, $5, $6, $7 \
            } \
          } \
          else { \
            printf "%-45s %-10s %-15s %-14s %s %s\n", rs, $1, $2, $3, $4, $5, $6, $7 \
          } \
        } \
      }'





====

Name                                          Target     State           Server         State details
------------------------------------------------------------------------------------------------------------------------
ora.asm                                       ONLINE     ONLINE          ikrac01        Started,STABLE
ora.cluster_interconnect.haip                 ONLINE     ONLINE          ikrac01        STABLE
ora.crf                                       ONLINE     ONLINE          ikrac01        STABLE
ora.crsd                                      ONLINE     OFFLINE         STABLE
ora.cssd                                      ONLINE     ONLINE          ikrac01        STABLE
ora.cssdmonitor                               ONLINE     ONLINE          ikrac01        STABLE
ora.ctssd                                     ONLINE     ONLINE          ikrac01        OBSERVER,STABLE
ora.diskmon                                   OFFLINE    OFFLINE         STABLE
ora.drivers.acfs                              ONLINE     ONLINE          ikrac01        STABLE
ora.evmd                                      ONLINE     ONLINE          ikrac01        STABLE
ora.gipcd                                     ONLINE     ONLINE          ikrac01        STABLE
ora.gpnpd                                     ONLINE     ONLINE          ikrac01        STABLE
ora.mdnsd                                     ONLINE     ONLINE          ikrac01        STABLE
ora.storage                                   ONLINE     ONLINE          ikrac01        STABLE

No comments:

Oracle DBA

anuj blog Archive