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
作者:czmmiao 文章出处:http://czmmiao.iteye.com/blog/1762742