crs_stat Utility

I am in Geneva this week, teaching part of a RAC 10g class at the World Trade Center togehter with Tamás Kerepes from Budapest. He is an enormously skilled collegue of mine and I am happy to get to know him.

I have demonstrated the migration of an entire cluster database from OCFS to ASM life in the class yesterday, including all datafiles, redologs, controlfiles, spfile and backups. This was a really thrilling and a little tricky process, but I succeeded at the end!
I will post about the procedure soon.

I came across a nice little option for the crs_stat utility which I was not aware of and which Tamás pointed out to me:
crs_stat -t
gives a short listing of the contents of the cluster registry rather than the long listing of the simply scr_stat without the -f.
This can come in very handy with a large cluster registry!
Look at the difference!
Here is a demo:
[oracle@ed-toraclin9a oracle]$ crs_stat –help
Usage: crs_stat [resource_name [...]] [-v] [-l] [-q] [-c cluster_member]
crs_stat [resource_name [...]] -t [-v] [-q] [-c cluster_member]
crs_stat -p [resource_name [...]] [-q]
crs_stat [-a] application -g
crs_stat [-a] application -r [-c cluster_member]
crs_stat -f [resource_name [...]] [-q] [-c cluster_member]
crs_stat -ls [resource_name [...]] [-q]
[oracle@ed-toraclin9a oracle]$ crs_stat
NAME=ora.RDBB.RDBB1.inst
TYPE=application
TARGET=ONLINE
STATE=ONLINE on ed-toraclin9a

NAME=ora.RDBB.RDBB2.inst
TYPE=application
TARGET=ONLINE
STATE=ONLINE on ed-toraclin9b

NAME=ora.RDBB.db
TYPE=application
TARGET=ONLINE
STATE=ONLINE on ed-toraclin9b

NAME=ora.ed-toraclin9a.ASM1.asm
TYPE=application
TARGET=ONLINE
STATE=ONLINE on ed-toraclin9a

NAME=ora.ed-toraclin9a.LISTENER_ED-TORACLIN9A.lsnr
TYPE=application
TARGET=ONLINE
STATE=OFFLINE

NAME=ora.ed-toraclin9a.gsd
TYPE=application
TARGET=ONLINE
STATE=ONLINE on ed-toraclin9a

NAME=ora.ed-toraclin9a.ons
TYPE=application
TARGET=ONLINE
STATE=ONLINE on ed-toraclin9a

NAME=ora.ed-toraclin9a.vip
TYPE=application
TARGET=ONLINE
STATE=ONLINE on ed-toraclin9a

NAME=ora.ed-toraclin9b.ASM2.asm
TYPE=application
TARGET=ONLINE
STATE=ONLINE on ed-toraclin9b

NAME=ora.ed-toraclin9b.LISTENER_ED-TORACLIN9B.lsnr
TYPE=application
TARGET=ONLINE
STATE=ONLINE on ed-toraclin9b

NAME=ora.ed-toraclin9b.gsd
TYPE=application
TARGET=ONLINE
STATE=ONLINE on ed-toraclin9b

NAME=ora.ed-toraclin9b.ons
TYPE=application
TARGET=ONLINE
STATE=ONLINE on ed-toraclin9b

NAME=ora.ed-toraclin9b.vip
TYPE=application
TARGET=ONLINE
STATE=ONLINE on ed-toraclin9b

[oracle@ed-toraclin9a oracle]$ crs_stat -t
Name Type Target State Host
————————————————————
ora….B1.inst application ONLINE ONLINE ed-t…in9a
ora….B2.inst application ONLINE ONLINE ed-t…in9b
ora.RDBB.db application ONLINE ONLINE ed-t…in9b
ora….SM1.asm application ONLINE ONLINE ed-t…in9a
ora….9A.lsnr application ONLINE OFFLINE
ora….n9a.gsd application ONLINE ONLINE ed-t…in9a
ora….n9a.ons application ONLINE ONLINE ed-t…in9a
ora….n9a.vip application ONLINE ONLINE ed-t…in9a
ora….SM2.asm application ONLINE ONLINE ed-t…in9b
ora….9B.lsnr application ONLINE ONLINE ed-t…in9b
ora….n9b.gsd application ONLINE ONLINE ed-t…in9b
ora….n9b.ons application ONLINE ONLINE ed-t…in9b
ora….n9b.vip application ONLINE ONLINE ed-t…in9b

4 Responses to crs_stat Utility

  1. Tony says:

    There is an even better crsstat output possible where you can actually read the complete resource name instead of the ora……application.
    Its a script described in note 259301.1 on metalink.

    Example output:

    [opcbsol1]/u01/home/usupport> ./crsstat
    HA Resource Target State
    ———– —— —–
    ora.V10SN.V10SN1.inst ONLINE ONLINE on opcbsol1
    ora.V10SN.V10SN2.inst ONLINE ONLINE on opcbsol2
    ora.V10SN.db ONLINE ONLINE on opcbsol2
    ora.opcbsol1.ASM1.asm ONLINE ONLINE on opcbsol1
    ora.opcbsol1.LISTENER_OPCBSOL1.lsnr ONLINE ONLINE on opcbsol1
    ora.opcbsol1.gsd ONLINE ONLINE on opcbsol1
    ora.opcbsol1.ons ONLINE ONLINE on opcbsol1
    ora.opcbsol1.vip ONLINE ONLINE on opcbsol1
    ora.opcbsol2.ASM2.asm ONLINE ONLINE on opcbsol2
    ora.opcbsol2.LISTENER_OPCBSOL2.lsnr ONLINE ONLINE on opcbsol2
    ora.opcbsol2.gsd ONLINE ONLINE on opcbsol2
    ora.opcbsol2.ons ONLINE ONLINE on opcbsol2
    ora.opcbsol2.vip ONLINE ONLINE on opcbsol2

    regards, Tony van Esch

  2. lutz_hartmann says:

    Hi Tony, this is a very good metalink note, thanks for the update!
    =;-)

  3. Anonymous says:

    Great little script, just what I was looking for to check status on customer clusters when i dont always know all the service names etc that they have created.

  4. Igor Demidov says:

    Hi Guys,

    BTW if you need to check startup dependency use

    crs_stat -p | awk ‘/^NAME\=|REQUIRED_RESOURCES/{print $0;}’

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.