`

crsctl命令详解(原创)

阅读更多

crsctl语法

$./crsctl

Usage: crsctl check  crs          - checks the viability of the CRS stack

       crsctl check  cssd         - checks the viability of CSS

       crsctl check  crsd         - checks the viability of CRS

       crsctl check  evmd         - checks the viability of EVM

       crsctl set    css <parameter> <value> - sets a parameter override

       crsctl get    css <parameter> - gets the value of a CSS parameter

       crsctl unset  css <parameter> - sets CSS parameter to its default

       crsctl query  css votedisk    - lists the voting disks used by CSS

       crsctl add    css votedisk <path> - adds a new voting disk

       crsctl delete css votedisk <path> - removes a voting disk

       crsctl enable  crs    - enables startup for all CRS daemons

       crsctl disable crs    - disables startup for all CRS daemons

       crsctl start crs  - starts all CRS daemons.

       crsctl stop  crs  - stops all CRS daemons. Stops CRS resources in case of cluster.

       crsctl start resources  - starts CRS resources. 

       crsctl stop resources  - stops  CRS resources. 

       crsctl debug statedump evm  - dumps state info for evm objects

       crsctl debug statedump crs  - dumps state info for crs objects

       crsctl debug statedump css  - dumps state info for css objects

       crsctl debug log css [module:level]{,module:level} ... 

                             - Turns on debugging for CSS 

       crsctl debug trace css - dumps CSS in-memory tracing cache

       crsctl debug log crs [module:level]{,module:level} ... 

                             - Turns on debugging for CRS 

       crsctl debug trace crs - dumps CRS in-memory tracing cache

       crsctl debug log evm [module:level]{,module:level} ... 

                             - Turns on debugging for EVM

       crsctl debug trace evm - dumps EVM in-memory tracing cache

       crsctl debug log res <resname:level> turns on debugging for resources

       crsctl query crs softwareversion [<nodename>] - lists the version of CRS software installed

       crsctl query crs activeversion - lists the CRS software operating version

       crsctl lsmodules css - lists the CSS modules that can be used for debugging

       crsctl lsmodules crs - lists the CRS modules that can be used for debugging

       crsctl lsmodules evm - lists the EVM modules that can be used for debugging

 If necesary any of these commands can be run with additional tracing by

 adding a "trace" argument at the very front.

 Example: crsctl trace check css

使用案例

检查crs状态

$ crsctl check crs

CSS appears healthy

CRS appears healthy

EVM appears healthy

检查单个状态 

$ crsctl check css

CSS appears healthy

启动crs栈,必须使用root用户

# ./crsctl start crs

Attempting to start CRS stack 

The CRS stack will be started shortly 

停止crs栈,必须使用root用户

# ./crsctl stop crs 

Stopping resources. 

Successfully stopped CRS resources 

Stopping CSSD. 

Shutting down CSS daemon. 

Shutdown request successfully issued.

配置crs进程栈是否随着操作系统的启动而自启动,有时出于维护目的需要关闭这个特性,可以用root用户执行下面命令。 

# ./crsctl disable crs 

# ./crsctl enable crs 

这个命令实际是修改了/etc/oracle/scls_scr/raw/root/crsstart这个文件里的内容。

查看votedisk磁盘位置

$ crsctl query css votedisk

 0.     0    /dev/raw/raw2

located 1 votedisk(s).

增加votedisk

# ./crsctl add css votedisk /dev/raw/raw3 -force
Now formatting voting disk: /dev/raw/raw3
successful addition of votedisk /dev/raw/raw3.
 

删除votedisk

# ./crsctl delete css votedisk /dev/raw/raw4 -force
successful deletion of votedisk /dev/raw/raw4.

关于维护votedisk的相关内容可以查看笔者的如下博客
http://czmmiao.iteye.com/admin/blogs/1758360

查看crs参数

$crsctl get css misscount

60

修改crs参数,必须为root用户

# ./crsctl set css miscount 60

跟踪crs模块,提供辅助功能

CRS由CRS,CSS,EVM三个服务组成,每个服务又是由一系列module组成,crsctl允许对每个module进行跟踪,并把跟踪内容记录到日志中。 

$ crsctl lsmodules css

The following are the CSS modules :: 

    CSSD

    COMMCRS

    COMMNS

$ crsctl lsmodules evm

The following are the EVM modules :: 

   EVMD

   EVMDMAIN

   EVMCOMM

   EVMEVT

   EVMAPP

   EVMAGENT

   CRSOCR

   CLUCLS

   CSSCLNT

   COMMCRS

   COMMNS

跟踪CSSD模块,需要root用户执行: 

# ./crsctl debug log css "CSSD:1"

Configuration parameter trace is now set to 1.

Set CRSD Debug Module: CSSD  Level: 1

查看跟踪日志 

# pwd 

/u01/app/oracle/product/crs/log/rac1/cssd 

# more ocssd.log 

[    CSSD]2013-01-05 16:32:38.533 [98499472] >TRACE:   clssgmClientConnectMsg: Connect from con(0x92d9248) proc(0x92def28) pid() proto(10:2:1:1)

[    CSSD]2013-01-05 16:33:39.309 [98499472] >TRACE:   clssgmClientConnectMsg: Connect from con(0x92df0f0) proc(0x92d9e78) pid() proto(10:2:1:1)

[    CSSD]2013-01-05 16:33:39.481 [98499472] >TRACE:   clssgmClientConnectMsg: Connect from con(0x92df488) proc(0x92def08) pid() proto(10:2:1:1)

[    CSSD]2013-01-05 16:34:27.955 [88009616] >TRACE:   clssscSetDebugLevel: The logging level is set to 1 ,the cache level is set to 2

[    CSSD]2013-01-05 16:34:40.508 [98499472] >TRACE:   clssgmClientConnectMsg: Connect from con(0x92df0f0) proc(0x92defa8) pid() proto(10:2:1:1)

[    CSSD]2013-01-05 16:34:40.929 [98499472] >TRACE:   clssgmClientConnectMsg: Connect from con(0x92dad28) proc(0x92db440) pid() proto(10:2:1:1)


参考至:《大话Oracle Rac》张晓明著

本文原创,转载请注明出处、作者
如有错误,欢迎指正
邮箱:czmcj@163.com

0
2
分享到:
评论

相关推荐

    CRSCTL命令的用法举例

    CRSCTL命令的用法举例 CRSCTL命令的用法举例 CRSCTL命令的用法举例

    RAC crsctl系统命令手册.docx

    linux服务器安装oracleRAC集群使用CRSCTL指令检查各个节点是否正常,确保数据库正常运行

    Oracle 10G RAC 日常管理

    Oracle 10G RAC 日常管理 CRS的管理 CRSCTL命令控制着本地节点的CRS服务(Oracle clusterware processes) SRVCTL命令介绍 SRVCTL命令可以控制RAC数据库中的instance,listener以及services。

    linux中oracle的日常维护命令

    linux中oracle的日常维护命令 操作命令以及问题分析

    oracle_rac管理基本命令

    oracle_rac管理基本命令 rac oracle clusterware 命令集 按不同层次划分 1.节点层次,olsnodes 2.网络层,oifcfg 3.集群层,crsctl,ocrcheck,ocrdump,ocrconfig 4.应用层,srvctl ,onsctl,crs_stat ……

    cvncheck参考

    cvn check crsctl check crs

    Oracle查询当前的crs/has自启动状态实例教程

    使用crsctl disable/enable crs命令可以禁用/启用crs的自启动,但没有命令去查看当前自启动状态,虽然命令可以反复执行,但看不到实际状态总归还是让人不放心。 我在Linux测试环境下试了几个Oracle RAC版本: ...

    RAC ORACLE 节点有关操作

    ORACLE RAC 节点有关的操作 srvctl crs_stop crs_stat crsctl

    Oracle11g RAC开启关闭、设置归档小结

    root@oeltan1 ~]# crsctl stop crs 启动: 代码如下: [root@oeltan1 ~]# crsctl start crs [oracle@oeltan1 ~]$srvctl start asm -n node_name 上述开机一般已经启动 代码如下: [oracle@oeltan1 ~]$ srvctl start ...

    oracle 11g RAC 常用命令整理分享

    1)、检查集群状态: [grid@rac02 ~]$ crsctl check cluster CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online 2)、所有 ...

    【OGG】Rac管理OGG高可用.pdf

    [oracle@racdb1 ogg]$ crsctl stat res -t ... Cluster Resources -------------------------------------------------------------------------------- ggvip 1 ONLINE ONLINE racdb1 oggapp 1 ONLINE ON...

    Oracle 12.2监听无法启动解决方法

    在自己的虚拟机的做实验,突然发现使用PL/SQL ...使用crsctl查看资源状态:发现监听的状态确实是OFFLINE状态 [root@rhel7 .oracle]# crsstat ----------------------------------------------------------------------

    数据库项目组日常运维及应急故障处理手册.docx

    通过操作系统命令top topas glance等查看top进程号,确认是系统进程还是oracle应用进程,查询当前top进程执行的操作和sql语句进行分析。 根据进程号获取正在执行的sql SELECT a.osuser, a.username,b.address,...

    构建最高可用Oracle数据库系统 Oracle 11gR2 RAC管理、维护与性能优化

    10.2.2 CRSCTL工具 10.2.3 SRVCTL工具 10.2.4 OIFCFG接口配置工具 10.3验证工具CVU 10.3.1基于阶段的验证 10.3.2 Grid Infrastructure安装阶段验证 10.3.3基于组件的验证 10.3.4共享存储组件验证 10.3.5遇到...

Global site tag (gtag.js) - Google Analytics