您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

Onsctl配置ONS服务(10G)

2024/12/23 19:17:26发布15次查看
onsctl onsctl这个命令是用来管理ons(oracle notification service)是oracleclustser实现fan event push模型的基
onsctl
onsctl这个命令是用来管理ons(oracle notification service)是oracleclustser实现fan event push模型的基础。
在rac环境下,需要使用$crs_home下的ons,而不是$oracle_home下的ons,这点需要注意。配置文件位于$crs_home/opmn/conf/ons.config。
[oracle@felix2 conf]$ pwd
/u01/oracle/10.2.0/crs_1/opmn/conf
[oracle@felix2 conf]$ cat ons.config
localport=6113
remoteport=6200
loglevel=3
useocr=on
[oracle@felix2 conf]$ netstat -ano | grep 6200
tcp 0 0 0.0.0.0:6200 0.0.0.0:* listen off (0.00/0/0)
tcp 0 0 192.168.10.102:8471 192.168.10.101:6200 established off (0.00/0/0)
[oracle@felix2 conf]$ netstat -ano | grep 6113
tcp 0 0 127.0.0.1:6113 0.0.0.0:* listen off (0.00/0/0)
tcp 0 0 127.0.0.1:42331 127.0.0.1:6113 established keepalive (2251.34/0/0)
tcp 0 0 127.0.0.1:42328 127.0.0.1:6113 established keepalive (2185.99/0/0)
tcp 0 0 127.0.0.1:6113 127.0.0.1:42331 established off (0.00/0/0)
tcp 0 0 127.0.0.1:6113 127.0.0.1:42328 established off (0.00/0/0)
unix 3 [ ] stream connected 6113
[oracle@felix2 conf]$
配置ons:
添加ons:
[oracle@felix2 conf]$ racgons add_configfelix11:6200 felix22:6200
删除ons:
[oracle@felix2 conf]$ racgons remove_configfelix11:6200 felix22:6200
[oracle@felix2 conf]$ 
onsctl命令:
使用onsctl命令可以启动、停止、调试ons,并重新载入配置文件,其命令格式如下:
注意:
ons进程运行,并不一定代表ons正常工作,需要使用ping命令来确认。
[oracle@felix2 conf]$ onsctl
usage: /u01/oracle/10.2.0/db_1/bin/onsctlstart|stop|ping|reconfig|debug
start - start opmn only.
stop - stop ons daemon
ping - test to see ifons daemon is running
debug - display debuginformation for the ons daemon
reconfig - reload the onsconfiguration
help - print a shortsyntax description (this).
detailed - print a verbosesyntax description.
(1)在os级别查看进程
[oracle@felix2 conf]$ ps -ef | grep ons
root 2530 1 0 20:19 ? 00:00:00 sendmail: acceptingconnections
oracle 5223 1 0 20:22 ? 00:00:00/u01/oracle/10.2.0/crs_1/opmn/bin/ons -d
oracle 5224 5223 0 20:22 ? 00:00:00 /u01/oracle/10.2.0/crs_1/opmn/bin/ons-d
oracle 10833 29589 0 21:59 pts/2 00:00:00 grep ons
[oracle@felix2 conf]$
(2)确认ons服务的状态
[oracle@felix2 conf]$ onsctl ping
number of configuration nodes retrieved: 2
0: {node = felix1, port = 6200}
adding remote host felix1:6200
1: {node = felix2, port = 6200}
remote port for local node in local config doesnot match that from ocr.
ons is not running ...
[oracle@felix2 conf]$
从输出的信息课件,ons服务是停止的。
(3)启动ons服务
[oracle@felix2 conf]$ onsctl start
number of configuration nodes retrieved: 2
0: {node = felix1, port = 6200}
adding remote host felix1:6200
1: {node = felix2, port = 6200}
……
……
【参考大话rac--张晓明】
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product