Checking Exadata components versions : the old fashioned way
dcli is an awesome tool to run commands in parallel across an Exadata cluster, we can then use it to check the versions of each DB Node like shown below :
[root@myclusterdb01 ~]# dcli -g ~/dbs_group -l root imageinfo -ver myclusterdb01: 12.1.2.2.1.160119 myclusterdb02: 12.1.2.2.1.160119 myclusterdb03: 12.1.2.2.1.160119 myclusterdb04: 12.1.2.2.1.160119 [root@myclusterdb01 ~]#
This is quick and efficient but there may be few things to optimize here; indeed :
- How to have a nice output with 8 DB nodes, 14 storage cells and 2 IB Switches ?
- Are your dbs_group, cell_group, ib_group files up to date ?
- You have to remember that the syntax to check the versions is different for the IB Switches than for the cells and DB nodes
exa-versions.sh : a new & better way
This is why I developed this exa-versions.sh script you will find an output below :- The type of the cluster (if the databasemachime.xml file is readable, if not, nothing is shown)
- The version of each component sorted by type : Compute nodes, Storage servers and IB Switches
- If a component's version is different (which is not what we want), it will be shown in another color (teal) to be easily visible
From X8M+ and the ROCE switches,
there is no more way to have a dynamic list of the Exadata components
so
exa-versions.sh
will automatically rely on hardcoded list. They are default in the script or can
be specified on the command line with the -C, -D,
-R and -I options (please see -h for more on this). You'll
then have the ROCE switches versions:
Options to show only some components
As we may not want to show the versions of all the components each time we want to check some versions, you may want to use the following options :- -d : show the database servers versions
- -c : show the cells versions
- -i : show the IB Switches versions
Option -h for the syntax
You may use the -h option for a summary of the available options :Please note the -n option I haven't discussed before. By default, the script adapts the number of nodes per line depending on the size of your screen. The -n option is there to override this behavior and force the number of node per line. It is mostly useless but it was fun to code !
Please find the code here and enjoy !
That's really cool!
ReplyDeleteI cannot execute ibhosts, ibswitches etc.. from Exadata DB server. Do you have any other way where this script can be run from DB server?
ReplyDeleteDo you mean that you cannot connect as root ?
DeleteFrom where I can download these handy scripts?
ReplyDeleteAt the end of the blog is a link "Please find the code here and enjoy !" or you can use the "Scripts" menu on top where you will find a "code" link as well as a "git" one to the git repo with all my scripts in it.
DeleteThanks for the useful scripts.The colors work in Putty but not SecureCRT. What do I need to change to get it working
ReplyDelete