# Set $GRID_HOME
export GRID_HOME=/u01/app/21.3.0.0/grid/	 (or)	 export GRID_HOME=/u01/app/19.3.0.0/grid/

## ==================================================================
##	01.	STOP & START CRS: ( run from ROOT user)
## ==================================================================
$GRID_HOME/bin/crsctl stop crs
	CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'node2'
	...
	CRS-4133: Oracle High Availability Services has been stopped.
$GRID_HOME/bin/crsctl start crs	
	CRS-4123: Oracle High Availability Services has been started.

## ==================================================================
##	02.	ENABLE/DISABLE AUTO RESTART OF CRS:
## ==================================================================
$GRID_HOME/bin/crsctl disable crs
	CRS-4621: Oracle High Availability Services autostart is disabled.
$GRID_HOME/bin/crsctl enable crs	
	CRS-4622: Oracle High Availability Services autostart is enabled.
	
## ==================================================================
##	03.	FIND THE CLUSTER NAME:
## ==================================================================
$GRID_HOME/bin/cemutlo -n
$GRID_HOME/bin/olsnodes -c
	node-cluster

## ==================================================================
##	04.	FIND GRID VERSION:
## ==================================================================
$GRID_HOME/bin/crsctl query crs softwareversion node1
	Oracle Clusterware version on node [node1] is [21.0.0.0.0]
$GRID_HOME/bin/crsctl query crs softwareversion node2	
	Oracle Clusterware version on node [node2] is [21.0.0.0.0]
$GRID_HOME/bin/crsctl query crs softwareversion -all
	Oracle Clusterware version on node [node1] is [21.0.0.0.0]
	Oracle Clusterware version on node [node2] is [21.0.0.0.0]

## ==================================================================	
##	05.	CHECK CLUSTER COMPONENT STATUS:
## ==================================================================
ps -ef | grep d.bin	 (or)	pgrep -lf d.bin

$GRID_HOME/bin/crsctl status resource
$GRID_HOME/bin/crsctl status resource -t    (or) 	$GRID_HOME/bin/crsctl stat resource -t

$GRID_HOME/bin/crsctl check css
	CRS-4529: Cluster Synchronization Services is online
	
$GRID_HOME/bin/crsctl check cssd
	CRS-272: This command remains for backward compatibility only
	Cluster Synchronization Services is online
	
$GRID_HOME/bin/crsctl check crsd
	CRS-272: This command remains for backward compatibility only
	Cluster Ready Services is online
	
$GRID_HOME/bin/crsctl check ctss
	CRS-4700: The Cluster Time Synchronization Service is in Observer mode.
	
$GRID_HOME/bin/crsctl check evmd
	CRS-272: This command remains for backward compatibility only
	Event Manager is online

## ==================================================================	
##	06.	FIND VOTING DISK LOCATION:
## ==================================================================
$GRID_HOME/bin/crsctl query css votedisk
	##  STATE    File Universal Id                File Name Disk group
	--  -----    -----------------                --------- ---------
	 1. ONLINE   d326053b81f74f20bf72fde9796132ef (/dev/oracleasm/disks/OCR) [OCR]
	Located 1 voting disk(s).

## ==================================================================	
##	07.	FIND OCR LOCATION:
## ==================================================================
$GRID_HOME/bin/ocrcheck
	Status of Oracle Cluster Registry is as follows :
    Version                  :          4
    Total space (kbytes)     :     491684
    Used space (kbytes)      :      84440
    Available space (kbytes) :     407244
    ID                       :  447150934
    Device/File Name         :       +OCR
                                Device/File integrity check succeeded
                                Device/File not configured
     Cluster registry integrity check succeeded
     Logical corruption check succeeded

## ==================================================================	
##	08.	FIND CLUSTER INTERCONNECT DETAILS:
## ==================================================================
$GRID_HOME/bin/oifcfg getif
	enp0s3  212.168.10.0  global  cluster_interconnect,asm
	enp0s8  212.168.56.0  global  public

#USER:ORACLE
sqlplus / as sysdba
SQL> select NAME,IP_ADDRESS from v$cluster_interconnects;
	NAME            IP_ADDRESS
	--------------- -----------------
	enp0s3:1        169.254.5.162
 
## ================================================================== 
##	09.	CHECK CRS STATUS OF LOCAL NODE:
## ==================================================================
$GRID_HOME/bin/crsctl check crs
	CRS-4638: Oracle High Availability Services is online
	CRS-4537: Cluster Ready Services is online
	CRS-4529: Cluster Synchronization Services is online
	CRS-4533: Event Manager is online

$GRID_HOME/bin/crsctl check css 	
	CRS-4529: Cluster Synchronization Services is online 
	
## ==================================================================
##	10.	CHECK STATUS OF ALL CRS RESOURCES:
## ==================================================================
$GRID_HOME/bin/crsctl stat res -t
$GRID_HOME/bin/crsctl stat res -t -init	

	--------------------------------------------------------------------
	Name           Target  State        Server       State details
	--------------------------------------------------------------------
	Cluster Resources                               
	--------------------------------------------------------------------
	ora.asm
		  1        ONLINE  ONLINE       node1       STABLE
	ora.cluster_interconnect.haip
		  1        ONLINE  ONLINE       node1       STABLE
	ora.crf
		  1        ONLINE  ONLINE       node1       STABLE
	ora.crsd
		  1        ONLINE  ONLINE       node1       STABLE
	ora.cssd
		  1        ONLINE  ONLINE       node1       STABLE
	ora.cssdmonitor
		  1        ONLINE  ONLINE       node1       STABLE
	ora.ctssd
		  1        ONLINE  ONLINE       node1       OBSERVER,STABLE
	ora.diskmon
		  1        ONLINE  ONLINE                   STABLE
	ora.evmd
		  1        ONLINE  ONLINE       node1       STABLE
	ora.gipcd
		  1        ONLINE  ONLINE       node1       STABLE
	ora.gpnpd
		  1        ONLINE  ONLINE       node1       STABLE
	ora.mdnsd
		  1        ONLINE  ONLINE       node1       STABLE
	ora.storage
		  1        ONLINE  ONLINE       node1       STABLE
	--------------------------------------------------------------------
## ==================================================================
##	11.	CHECK ACTIVE VERSION OF CLUSTER:
## ==================================================================
$GRID_HOME/bin/crsctl query crs activeversion
	Oracle Clusterware active version on the cluster is [21.0.0.0.0]	
	
## ==================================================================
##	12.	STOP AND START HIGH AVAILABILITY SERVICE (HAS)
## ==================================================================
$GRID_HOME/bin/crsctl stop has
	CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'node1'
	...
	CRS-4133: Oracle High Availability Services has been stopped.

$GRID_HOME/bin/crsctl start has
	CRS-4123: Oracle High Availability Services has been started.
	
## ==================================================================
##	13.	CHECK CRS STATUS OF REMOTE NODES:
## ==================================================================
$GRID_HOME/bin/crsctl check cluster	
	CRS-4537: Cluster Ready Services is online
	CRS-4529: Cluster Synchronization Services is online
	CRS-4533: Event Manager is online

$GRID_HOME/bin/crsctl check cluster -all	
	**************************************************************
	node1:
	CRS-4537: Cluster Ready Services is online
	CRS-4529: Cluster Synchronization Services is online
	CRS-4533: Event Manager is online
	**************************************************************
	node2:
	CRS-4537: Cluster Ready Services is online
	CRS-4529: Cluster Synchronization Services is online
	CRS-4533: Event Manager is online
	**************************************************************	
## ==================================================================
##	14.	DISK TIMEOUT FROM NODE TO VOTING DISK(DISKTIMEOUT):
## ==================================================================
$GRID_HOME/bin/crsctl get css disktimeout
	CRS-4678: Successful get disktimeout 200 for Cluster Synchronization Services.

## ==================================================================
##	15.	NETWORK LATENCY IN THE NODE INTERCONNECT (MISSCOUNT):
## ==================================================================
$GRID_HOME/bin/crsctl get css misscount
	CRS-4678: Successful get misscount 30 for Cluster Synchronization Services.
	
## ==================================================================
##	16.	MOVE VOTING DISK TO ANOTHER DISKGROUP:
## ==================================================================
$GRID_HOME/bin/crsctl replace votedisk +OCRVD	
	Successful addition of voting disk 2E4DED6CEE504FC8BF0080FB7BE6F.
	Successful addition of voting disk 8E87826024E24FFFBF565C011FC66.
	Successful addition of voting disk E1BA56DEDFF84FA8BF5E0302FC81E.
	Successful deletion of voting disk 2B7CE864C44D4FECBF65A188290AF.
	Successfully replaced voting disk group with +OCRVD.
	CRS-4266: Voting file(s) successfully replaced
	
## ==================================================================
##	17.	VOTING DISK:
## ==================================================================
#ADD:
$GRID_HOME/bin/crsctl add css votedisk

#DELETE:
$GRID_HOME/bin/crsctl delete css votedisk

## ==================================================================
##	18.	 GET OCR DISK BACKUP DETAILS:
## ==================================================================
ocrconfig -showbackup	
	PROT-24: Auto backups for the Oracle Cluster Registry are not available
	PROT-25: Manual backups for the Oracle Cluster Registry are not available

## ==================================================================
##	19.	FIND NODE ROLES IN CLUSTER:
## ==================================================================
$GRID_HOME/bin/crsctl get node role status -all
	Node 'node1' active role is 'hub'
	Node 'node2' active role is 'hub'	
	
## ==================================================================	
##	20.	CHECK WHETHER STANDARD OR FLEX ASM:
## ==================================================================
$GRID_HOME/bin/crsctl get cluster mode status
	Cluster is running in "standard" mode   (or)
	Cluster is running in "flex" mode
	
## ==================================================================	
##	21.	CHECK CRS CONFIGUATION:
## ==================================================================
$GRID_HOME/bin/crsctl config crs	
	CRS-4622: Oracle High Availability Services autostart is enabled.
	
## ==================================================================
##	22.	$GRID_HOME/bin/crsctl HAS COMMANDS FOR STANDALONE GRID INFRASTRCUTURE:
## ==================================================================
$GRID_HOME/bin/crsctl check has
	CRS-4638: Oracle High Availability Services is online
$GRID_HOME/bin/crsctl config has
	CRS-4622: Oracle High Availability Services autostart is enabled.
$GRID_HOME/bin/crsctl disable has
	CRS-4621: Oracle High Availability Services autostart is disabled.
$GRID_HOME/bin/crsctl enable has
	CRS-4622: Oracle High Availability Services autostart is enabled.
$GRID_HOME/bin/crsctl query has releaseversion
	Oracle High Availability Services release version on the local node is [21.0.0.0.0]
$GRID_HOME/bin/crsctl query has softwareversion
	Oracle High Availability Services version on the local node is [21.0.0.0.0]
	
## ==================================================================
##	23.	FIND CLUSTER CONFIGURATION INFORMATION:
## ==================================================================
$GRID_HOME/bin/crsctl get cluster configuration
	Name                : node-cluster
	Configuration       : Cluster
	Class               : Standalone Cluster
	Type                : flex
	The cluster is not extended.
--------------------------------------------------------------------------------
      MEMBER CLUSTER INFORMATION
      Name       Version        GUID                       Deployed Deconfigured
================================================================================
   ...
================================================================================

hostgator