OLSNODES命令的八種格式

zcs0237發表於2014-07-10
OLSNODES命令的八種格式
 
a. OLSNODES命令可以返回RAC的節點、對應的id以及vip對應的節點名稱。
b.軟體版本:10.2.0.1.0  on 2.6.18-53.el5
c. 實驗環境是:rac1=192.168.1.101,rac2=192.168.1.102
d.$ olsnodes -h
Usage: olsnodes [-n] [-p] [-i] [ | -l] [-g] [-v]



1、預設
[oracle@rac1 ~]$ olsnodes
rac1
rac2

2、-n print node number with the node name                 列印節點編號和節點名
[oracle@rac1 ~]$ olsnodes -n
rac1 1
rac2 2

3、-p print private interconnect name with the node name   列印專用互聯名和節點名
[oracle@rac1 ~]$ olsnodes -p
rac1 rac1-priv
rac2 rac2-priv

4、-i print virtual IP name with the node name             列印虛擬 IP 名和節點名
[oracle@rac1 ~]$ olsnodes -i
rac1 rac1-vip
rac2 rac2-vip
5、 print information for the specified node         列印指定節點的資訊
[oracle@rac1 ~]$ olsnodes rac1
rac1

[oracle@rac1 ~]$ olsnodes rac2
rac2

[oracle@rac1 ~]$ olsnodes rac1 -v
prlslms: Initializing LXL global
prlsndmain: Initializing CLSS context
prlsnode: retrieving information for node=rac1
prls_getnodenum: Retrieving the node number for node = rac1
prls_getnodenum: node number = 1
prls_printdata: Printing the node data
rac1
prlsndmain: olsnodes executed successfully
prlsndterm: Terminating LSF


6、-l print information for the local node                 列印本地節點的資訊
[oracle@rac1 ~]$ olsnodes -l
rac1
[oracle@rac1 ~]$ olsnodes -l -p
rac1 rac1-priv


7、-g turn on logging                                      啟用事件記錄
[oracle@rac1 ~]$ olsnodes -l -g
rac1
[oracle@rac1 ~]$ ls -1 *.log
olsnodes.log
[oracle@rac1 ~]$ cat *.log
Oracle Database 10g CRS Release 10.2.0.1.0 Production Copyright 1996, 2005 Oracle.  All rights reserved.
2014-07-10 16:19:07.938: [ default][1391136]prlsndini: LOG initialized 
2014-07-10 16:19:07.938: [ default][1391136] prlsndini: LEM initialized 
2014-07-10 16:19:07.953: [ default][1391136]prlsndmain: olsnodes successful!!
2014-07-10 16:19:27.256: [ default][1690400]prlsndini: LOG initialized 
2014-07-10 16:19:27.256: [ default][1690400] prlsndini: LEM initialized 
2014-07-10 16:19:27.260: [ default][1690400]prlsndmain: olsnodes successful!!


8、-v run in verbose mode                                  在詳細模式下執行
[oracle@rac1 ~]$ olsnodes -v
prlslms: Initializing LXL global
prlsndmain: Initializing CLSS context
prlsmemberlist: No of cluster members configured = 256
prlsmemberlist: Getting information for nodenum = 1
prlsmemberlist: node_name = rac1
prlsmemberlist: ctx->lsdata->node_num = 1
prls_printdata: Printing the node data
rac1
prlsmemberlist: Getting information for nodenum = 2
prlsmemberlist: node_name = rac2
prlsmemberlist: ctx->lsdata->node_num = 2
prls_printdata: Printing the node data
rac2
prlsndmain: olsnodes executed successfully
prlsndterm: Terminating LSF


zcs0237 
2014.07.10
More cleaner and more efficient!

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/210154/viewspace-1215908/,如需轉載,請註明出處,否則將追究法律責任。

相關文章