Oracle 12.1.0.2 RAC olsnode系统命令手册

前言:添加root的环境变量

[root@oracle1 /]# cd ~

[root@oracle1 ~]# vim .bash_profile

export GRID_BASE=/u01/app/grid/

export GRID_HOME=/u01/app/12.1.0/grid_1/

export PATH=$PATH:$GRID_HOME/bin

 

[grid@oracle1 ~]$ olsnodes -help

Usage: olsnodes [ [ [-n] [-i] [-s] [-t] [<node> | -l [-p]] ] | [-c] | [-a] ] [-g] [-v]

        where

                -n print node number with the node name

                -p print private interconnect address for the local node

                -i print virtual IP name or address with the node name

                <node> print information for the specified node

                -l print information for the local node

                -s print node status - active or inactive

                -t print node type - pinned or unpinned

                -g turn on logging

                -v Run in debug mode; use at direction of Oracle Support only.

                -c print clusterware name

                -a print active node roles of the nodes in the cluster

 

[grid@oracle1 ~]$

 

 

 

 

[grid@oracle1 ~]$ olsnodes -l -p

oracle1 192.168.100.101

 

 

[grid@oracle1 ~]$ olsnodes -i

oracle1 oracle1-vip

oracle2 oracle2-vip

 

 

[grid@oracle1 ~]$ olsnodes -s

oracle1 Active

oracle2 Active

 

 

[grid@oracle1 ~]$ olsnodes -t

oracle1 Unpinned

oracle2 Unpinned

 

 

 

[grid@oracle1 ~]$ olsnodes -g

oracle1

oracle2

 

 

 

[grid@oracle1 ~]$ olsnodes -v

 

olsnodes init: LEM initialized

lang init : Initializing LXL global

main: Initializing CLSS context

memberlist: No of cluster members configured = 256

memberlist: Allocated mem for lease node vector.

memberlist: Leased NodeList entries used = 2.

memberlist: Getting information for nodenum = 1

memberlist: node_name = oracle1

memberlist: ctx->lsdata->node_num = 1

print data: Printing the node data

oracle1

memberlist: Getting information for nodenum = 2

memberlist: node_name = oracle2

memberlist: ctx->lsdata->node_num = 2

print data: Printing the node data

oracle2

main: olsnodes executed successfully

term: Terminating LSF

 

 

 

[grid@oracle1 ~]$ olsnodes -c

oracle-rac

 

 

[grid@oracle1 ~]$ olsnodes -a

oracle1 Hub

oracle2 Hub