I have to produce command output on Windows machine on similar way that I can produce it on Linux machine.
Command is:
Code: Select all
crsctl stat res -t
Code: Select all
C:\Users\Administrator>crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE win2008
ora.FRA.dg
ONLINE ONLINE win2008
ora.LISTENER.lsnr
ONLINE ONLINE win2008
ora.asm
ONLINE ONLINE win2008 Started
ora.ons
OFFLINE OFFLINE win2008
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE win2008
ora.evmd
1 ONLINE ONLINE win2008
ora.finnew.db
1 OFFLINE OFFLINE
Code: Select all
crsctl status res |grep -v "^$"|awk -F "=" 'BEGIN {print " "} {printf("%s",NR%4 ? $2"|" : $2"\n")}'|sed -e 's/ *, /,/g' -e 's/, /,/g'|\
awk -F "|" 'BEGIN { printf "%-40s%-35s%-20s%-50s\n","Resource Name","Resource Type","Target ","State" }{ split ($3,trg,",") split ($4,st,",")}{for (i in trg) {printf "%-40s%-35s%-20s%-50s\n",$1,$2,trg[i],st[i]}}'
Code: Select all
Resource Name Resource Type Target State
ora.DATA.dg ora.diskgroup.type ONLINE ONLINE on oracle-linux-test-vm
ora.FRA.dg ora.diskgroup.type ONLINE ONLINE on oracle-linux-test-vm
ora.LISTENER.lsnr ora.listener.type ONLINE ONLINE on oracle-linux-test-vm
ora.asm ora.asm.type ONLINE ONLINE on oracle-linux-test-vm
ora.cssd ora.cssd.type ONLINE ONLINE on oracle-linux-test-vm
ora.diskmon ora.diskmon.type OFFLINE OFFLINE
ora.evmd ora.evm.type ONLINE ONLINE on oracle-linux-test-vm
ora.ons ora.ons.type OFFLINE OFFLINE
ora.testdb.db ora.database.type ONLINE ONLINE on oracle-linux-test-vm
Regards.