CRSCTL命令的用法举例(转帖)

主要内容:

. CRS 的组成

. CRSCTL命令的用法举例

. Start/Stop RAC Instance

[@more@]


1. How the crs related services startup when OS startup or reboot:

OS: Linux

From the directory (/etc/init.d), There are four executable shell scripts:
init.crs (Combination of all services' start)
init.crsd (crs daemon)
init.cssd (cluster synchronization service)
init.evmd (event manager)

Note: /etc/init.d/init.crs start is not supported until 10.1.0.4
/etc/init.d/init.crs stop is supported since 10.1.0.2


2. How to start/stop crs related services ?

From the directory: $CRS_HOME/bin, there are several executable shell scripts (Start with crs_):

crsctl (Combination of all crs conctrl command)
crsd (crs daemon)
crs_getperm (Get parameter)
crs_profile
crs_register (Register targets on the host)

crs_unregister (Unregister targets on the host)

Maybe this command is useful when you want to remove error register information which has been detected by CRS.

Steps:
#list all listener of cluster env
crs_stat |grep lsnr

# resource_name comes from: crs_stat |grep name
crs_unregister resource_name -q

crs_relocate (Relocate targets on the host)


3. Detailed usage

3.1 crsctl

Note: There are some relationship between CSS,CRS,EVM services.Bouncing CRS service will start CRS resources first, then bounce CSS and EVM service automatically;

Shutting down CRS service will stop CRS resources only, It doesn't affect other related services(CSS,EVM)

If user wanna shutdown CSS service, CRS, EVM service will be stopped as well;

If user wanna shutdown CRS or CSS service, EVM service will be stopped as well;

So, In order to eliminate the dependency of these services, we'd better use command line tool "crsctl" to bounce crs service. Issue the command "crsctl" and it will list all available commands:


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 - sets a parameter override
crsctl get css - gets the value of a CSS parameter
crsctl unset css - sets CSS parameter to its default

crsctl query css votedisk - lists the voting disks used by CSS
crsctl add css votedisk - adds a new voting disk
crsctl delete css votedisk - 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.

Note: Since 10.2, User can choose either "init.crs start/stop" or "crsctl start/stop crs" to start/stop all CRS daemons.

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 turns on debugging for resources

crsctl query crs softwareversion []
- 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


3.2 Startup/shutdown steps

In windows, the correct startup/shutdown steps is:

Shutdown:
1. Shutdown db console service if it's running
2. Shutdown OraService via "control panel" ->"services"
3. srvctl stop instance -d -i
4. srvctl stop asm -n if using asm
5. srvctl stop nodeapps -n
6. Shutdown crs service via "control panel" ->"services"

Startup:
1. Startup crs service via "control panel" ->"services"
2. srvctl start nodeapps -n
3. srvctl start asm -n if using asm
4. srvctl start instance -d -i
5. Startup OraService via "control panel" ->"services"
6. Startup db console service if it's running

In Linux, almost all steps are same except how to startup/shutdown crs service. You can execute "/etc/init.d/init.crs stop/start" or issue "crsctl start/stop crs" to bounce or shutdown crs service.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12482/viewspace-975778/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/12482/viewspace-975778/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值