OLSNODES命令

yangtingkun發表於2010-12-18

這個命令是用來檢查RAC節點的。

 

 

用法很簡單:

bash-2.03$ $ORACLE_HOME/../crs/bin/olsnodes
racnode1
racnode2
bash-2.03$ $ORACLE_HOME/../crs/bin/olsnodes -h
用法: olsnodes [-n] [-p] [-i] [ | -l] [-g] [-v]
        where
                -n
列印節點編號和節點名
                -p
列印專用互聯名和節點名
                -i
列印虛擬 IP 名和節點名
               
列印指定節點的資訊
                -l
列印本地節點的資訊
                -g
啟用事件記錄
                -v
在詳細模式下執行

bash-2.03$ $ORACLE_HOME/../crs/bin/olsnodes -n
racnode1        1
racnode2        2
bash-2.03$ $ORACLE_HOME/../crs/bin/olsnodes -i
racnode1        racnode1-vip
racnode2        racnode2-vip
bash-2.03$ $ORACLE_HOME/../crs/bin/olsnodes -p
racnode1        racnode1-priv
racnode2        racnode2-priv
bash-2.03$ $ORACLE_HOME/../crs/bin/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 = racnode1
prlsmemberlist: ctx->lsdata->node_num = 1
prls_printdata: Printing the node data
racnode1
prlsmemberlist: Getting information for nodenum = 2
prlsmemberlist: node_name = racnode2
prlsmemberlist: ctx->lsdata->node_num = 2
prls_printdata: Printing the node data
racnode2
prlsndmain: olsnodes executed successfully
prlsndterm: Terminating LSF
bash-2.03$ $ORACLE_HOME/../crs/bin/olsnodes racnode1  
racnode1
bash-2.03$ $ORACLE_HOME/../crs/bin/olsnodes racnode2
racnode2
bash-2.03$ $ORACLE_HOME/../crs/bin/olsnodes racnode2 -v
prlslms: Initializing LXL global
prlsndmain: Initializing CLSS context
prlsnode: retrieving information for node=racnode2
prls_getnodenum: Retrieving the node number for node = racnode2
prls_getnodenum: node number = 2
prls_printdata: Printing the node data
racnode2
prlsndmain: olsnodes executed successfully
prlsndterm: Terminating LSF
bash-2.03$ $ORACLE_HOME/../crs/bin/olsnodes -l        
racnode1
bash-2.03$ $ORACLE_HOME/../crs/bin/olsnodes -l -p
racnode1        racnode1-priv

這個命令不僅可以返回RAC的節點,還可以返回對應的private_id以及vip對應的節點名稱。

 

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

相關文章