Database - RAC/Scalability (MOSC)

MOSC Banner

crsctl status res -t

edited Nov 14, 2017 4:00AM in Database - RAC/Scalability (MOSC) 6 commentsAnswered

I have a scripts like following to format crsctl status res output

################################################

# Table body:

$ORACLE_GRID/bin/crsctl stat res -v | $AWK \

'BEGIN { FS="="; state = 0; }

  $1~/NAME/ && $2~/'$RSC_KEY'/ {appname = $2; state=1;};

  state == 0 {next;}

  $1~/TYPE/ && $2~/'ora.cluster_vip_net1.type'/ && state == 1 {apptype = $2; state=2;};

  $1~/^STATE$/ && state == 2 {appstate = $2; state=3;}

  $1~/TARGET/ && state == 3 {apptarget = $2; state=4;}

  $1~/STATE_DETAILS/ && state == 4 {appdetails = $2; state=5;}

  state == 5 {printf "%-27s %-8s %-21s %-s\n", appname, apptarget, appstate, appdetails; state=0;}

  $1~/TYPE/ && $2~/'ora.asm_listener.type'/ && state == 1 {apptype = $2; state=6;}

  $1~/TYPE/ && $2~/'ora.asm.type'/ && state == 1 {apptype = $2; state=6;}

  $1~/TYPE/ && $2~/'ora.diskgroup.type'/ && state == 1 {apptype = $2; state=6;}

  $1~/TYPE/ && $2~/'ora.listener.type'/ && state == 1 {apptype = $2; state=6;}

  $1~/TYPE/ && $2~/'ora.database.type'/ && state == 1 {apptype = $2; state=6;}

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center