Complete display of Oracle 11g RAC crs_stat command results

Source: Internet
Author: User

The crs_stat command in Oracle 11g RAC has many new resource types compared with the previous version. By default, crs_stat-t is used to check that resources are a large piece of data, it looks really laborious. The author Paul Elbow and Enkitec provided us with a crsstat script to display all the resource types under Oracle 11g RAC in a clearer format. See the description below.

1. Install crsstat
We recommend that you use the root user or the oracle user to install the package to the/usr/local/bin directory.
When the script is run for the first time, a crsstat. env file is generated in the installation directory, which is used to describe the location information of crs.
Crs should be started before crsstat is installed, and the write permission should be given to the installation path where the crsstat script is located.

Download the crsstat.v1.2.2.zip source file:

Free in http://linux.bkjia.com/

The username and password are both www.bkjia.com

The specific download directory is in/July 6, 2013,/July 25, July,/Oracle 11g RAC crs_stat command results are displayed in full

Not downloaded

Bytes ----------------------------------------------------------------------------------------

The installation steps are as follows:
# Cd/usr/local/bin
# Unzip crsstat.v1.2.1.zip
# Mv crsstat. v1.2.2 crsstat
# Chmod 755 crsstat
#./Crsstat

# Chmod 644 crsstat. env
Check whether the configuration of the crsstat. env file is correct.
# More crsstat. env
GRID_HOME =/u01/app/11.2.0/grid
Grid_ver= 11.2
 

2. Demonstrate usage
Crsstat is easy to use. simply execute the crsstat command at the prompt. You can also use crsstat-h to output the help information of crsstat.

A. crsstat help information
[Grid @ linux1 ~] $ Crsstat-h

Usage: crsstat [-h] [-c] [search term]

-H => print this message
-C => output the resources by cluster or local

Examples:
Crsstat # show all resources
Crsstat listener # only show listener resources
Crsstat database # only show database resources
Crsstat-c listener # only show database resources sorted by cluster/local

Output Contains the following fields:
Resource Name
Resource Type, which between des an identifier C-Cluster and L-Local
Target State
Current State
Current Node (11gR2: or the last node in paraenthesis if the resource is Offline)
Failure Count (11gR2 only)
Restart Count (11gR2 only)
State Details (11gR2 only)

 

B. Use crsstat to view cluster resources
# Display all resources
[Oracle @ linux1 bin] $ crsstat
Resource Name Resource Type Target State Node fc rc State Details
----------------------------------------------------------------------------------------------------------------
Ora. ASM_DATA.dg diskgroup l online linux1 0
Ora. ASM_DATA.dg diskgroup l online linux2 0
Ora. FRA_DATA.dg diskgroup l online linux1 0
Ora. FRA_DATA.dg diskgroup l online linux2 0
Ora. LISTENER. lsnr Listener l online linux1 0
Ora. LISTENER. lsnr Listener l online linux2 0
Ora. LISTENER_SCAN1.lsnr SCAN Listener c online linux1 0
Ora. LISTENER_SCAN2.lsnr SCAN Listener c online linux2 0
Ora. OCR_VOTE.dg diskgroup l online linux1 0
Ora. OCR_VOTE.dg diskgroup l online linux2 0
Ora. asm asm l online linux1 0 Started
Ora. asm asm l online linux2 0 Started
Ora. eons l online linux1 0
Ora. eons l online linux2 0
Ora. gsd Gbl Svc Daemon l offline (linux1) 0
Ora. gsd Gbl Svc Daemon l offline (linux2) 0
Ora. linux1.vip Cluster vip c online linux1 0
Ora. linux2.vip Cluster vip c online linux2 0
Ora. mmbo. db database c online linux1 0 Open
Ora. mmbo. db database c online linux2 0 Open
Ora. mmbo11g. db database c online linux1 0 Open
Ora. net1.network Network (VIP) l online linux1 0
Ora. net1.network Network (VIP) l online linux2 0
Ora. Enter c offline () 0
Ora. ons Ora Notif Svc l online linux1 0
Ora. ons Ora Notif Svc l online linux2 0
Ora. registry. acfs registry l online linux1 0
Ora. registry. acfs registry l online linux2 0
Ora. scan1.vip scan vip c online linux1 0
Ora. scan2.vip scan vip c online linux2 0

 

C. Other usage
# Displays service-related information. As no service is configured in the current rac environment, no information is displayed.
# Author: Robinson
# Blog: http://www.bkjia.com

[Oracle @ linux1 bin] $ crsstat service
Resource Name Resource Type Target State Node fc rc State Details
----------------------------------------------------------------------------------------------------------------

# Display the information of databases registered in the Cluster
[Oracle @ linux1 bin] $ crsstat database
Resource Name Resource Type Target State Node fc rc State Details
----------------------------------------------------------------------------------------------------------------
Ora. mmbo. db database c online linux1 0 Open
Ora. mmbo. db database c online linux2 0 Open
Ora. mmbo11g. db database c online linux1 0 Open

# Display listener information in the Cluster
[Oracle @ linux1 bin] $ crsstat lsnr
Resource Name Resource Type Target State Node fc rc State Details
----------------------------------------------------------------------------------------------------------------
Ora. LISTENER. lsnr Listener l online linux1 0
Ora. LISTENER. lsnr Listener l online linux2 0
Ora. LISTENER_SCAN1.lsnr SCAN Listener c online linux1 0
Ora. LISTENER_SCAN2.lsnr SCAN Listener c online linux2 0

# You can also use the grep command to filter data.
[Oracle @ linux1 bin] $ crsstat | grep-I offline
Ora. gsd Gbl Svc Daemon l offline (linux1) 0
Ora. gsd Gbl Svc Daemon l offline (linux2) 0
Ora. Enter c offline () 0

[Grid @ linux1 ~] $ Crsstat-c listener


Resource Name Resource Type Target State Node fc rc State Details
----------------------------------------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
Ora. LISTENER. lsnr Listener l online linux1 0
Ora. LISTENER. lsnr Listener l online linux2 0

Cluster Resources
--------------------------------------------------------------------------------
Ora. LISTENER_SCAN1.lsnr SCAN Listener c online linux1 0
Ora. LISTENER_SCAN2.lsnr SCAN Listener c online linux2 0

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.