crsctl命令用法

 admin   2022-06-28 13:04   133 人阅读  0 条评论

1.检查crs 状态

[oracle@rac01 ~]$ crsctl  check  crs
CSS appears healthy
CRS appears healthy
EVM appears healthy

以上输出的crs css evm组件都是正常的,若有组件检查失败,

输出会给出以下Failure 信息:

[oracle@rac01 ~]$ crsctl check crs
Failure 1 contacting CSS daemon
Cannot communicate with CRS
Cannot communicate with EVM


2.检查crs各个组件的状态信息

检查cssd组件状态

[oracle@rac01 ~]$ crsctl check cssd
CSS appears healthy

检查crsd组件状态
[oracle@rac01 ~]$ crsctl check crsd
CRS appears healthy

检查evmd组件状态
[oracle@rac01 ~]$ crsctl  check evmd
EVM appears healthy



3.用以下两条命令来维护crs服务的自动启动,需要用root用户执行

[root@rac01 ~]# /opt/ora10g/product/10.2.0/crs/bin/crsctl disable crs

[root@rac01 ~]# /opt/ora10g/product/10.2.0/crs/bin/crsctl enable  crs



4.用root身份来停止crs服务

[root@rac01 ~]# /opt/ora10g/product/10.2.0/crs/bin/crsctl  stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.

此时我们在rac01节点检查crs各个组件的状态会有以下的信息

[oracle@rac01 ~]$ crsctl check crs
Failure 1 contacting CSS daemon
Cannot communicate with CRS
Cannot communicate with EVM

rac02节点正常
[oracle@rac02 ~]$ crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy


5.用root身份来开启CRS服务

[root@rac01 ~]# /opt/ora10g/product/10.2.0/crs/bin/crsctl  start  crs
Attempting to start CRS stack
The CRS stack will be started shortly

此时系统正在启动CRS,我们来检查此时crs服务的状态,crs组件服务依次开启
只要所有组件状态都是healthy

[oracle@rac01 ~]$ crsctl check crs
CSS appears healthy
Cannot communicate with CRS
EVM appears healthy

[oracle@rac01 ~]$ crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy




6. 查看votedisk的信息

[oracle@rac01 ~]$ crsctl  query css votedisk
 0.     0    /dev/raw/raw1

located 1 votedisk(s).

1.启停集群: (需要root用户)

$GRID_HOME/bin/crsctl stop crs
 
$GRID_HOME/bin/crsctl start crs

2.开启/关闭集群自动启动

$GRID_HOME/bin/crsctl disable crs
 
$GRID_HOME/bin/crsctl enable crs

3.查看集群名字

$GRID_HOME/bin/cemutlo -n
 
or 
 
$GRID_HOME/bin/olsnodes -c

4.查看集群版本

$GRID_HOME/bin/crsctl query crs softwareversion hostname

5.查看集群组件状态

$GRID_HOME/bin/crsctl stat res -t
 
$GRID_HOME/bin/crsctl check crs
 
$GRID_HOME/bin/crsctl check cssd
 
$GRID_HOME/bin/crsctl check crsd
 
$GRID_HOME/bin/crsctl check evmd

6.查看voting disk位置

$GRID_HOME/bin/crsctl query css votedisk

7.查看OCR位置

$GRID_HOME/bin/ocrcheck

8.查看集群私网信息

$GRID_HOME/bin/oifcfg getif

app-ipmp0 172.21.39.128 global public
loypredbib0 172.16.3.192 global cluster_interconnect
loypredbib1 172.16.4.0 global cluster_interconnect 
 
 
select NAME,IP_ADDRESS from v$cluster_interconnects;
 
NAME IP_ADDRESS--------------- ----------------loypredbib0 172.16.3.19loypredbib1 172.16.4.

9.查看本节点crs状态

crsctl check crs
 
CRS-4638: Oracle High Availability Services is onlineCRS-4537: Cluster Ready Services is onlineCRS-4529: Cluster Synchronization Services is onlineCRS-4533: Event Manager is online

10.查看所有crs资源状态

$GRID_HOME/bin/crsctl stat res -t
$GRID_HOME/bin/crsctl stat res -t -init

11.查看集群active version

crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [12.1.0.2.0]

12.启停HAS

crsctl stop has
 
crsctl start has

13.查看远程节点CRS状态

crsctl check cluster

14.查看voting disk超时(disktimeout)

crsctl get css disktimeout
CRS-4678: Successful get disktimeout 200 for Cluster Synchronization Services.

15.查看私网延迟(Misscount)

crsctl get css misscount
CRS-4678: Successful get misscount 30 for Cluster Synchronization Services.

16.移动voting disk到别的磁盘组

crsctl replace votedisk +OCRVD
Successful addition of voting disk 2e4ded6cee504fc8bf078b080fb7be6f.
Successful addition of voting disk 8e87826024e24fffbf5add65c011fc66.
Successful addition of voting disk e1ba56dedff84fa8bf5605e0302fc81e.
Successful deletion of voting disk 2b7ce864c44d4fecbf60885a188290af.
Successfully replaced voting disk group with +OCRVD.
CRS-4266: Voting file(s) successfully replaced

17.新增votedisk

crsctl add css votedisk

18.删除votedisk

crsctl delete css votedisk

19.查看ocr备份信息

ocrconfig -showbackup

20.查看集群是否为standard或者flex ASM

crsctl get cluster mode status
 
Cluster is running in "standard" mode

21 .查看crs配置

crsctl config crs

22.单节点集群has命令

crsctl check has
crsctl config has
crsctl disable has
crsctl enable has
crsctl query has releaseversion
crsctl query has softwareversion
crsctl start has
crsctl stop has


本文地址:https://liuchunjie.top/?id=376
版权声明:本文为原创文章,版权归 admin 所有,欢迎分享本文,转载请保留出处!

 发表评论


表情

还没有留言,还不快点抢沙发?