Twitter

exa-versions.sh : Exadata components versions in a glimpse (X8M / ROCE compatible)

I do patch Exadatas quite a lot and I then often need to check the versions of each Exadata component quite often : before starting a maintenance to ensure that each component runs the same version, after a maintenance to double check that everything went as expected and I also need to communicate this information to the clients then a quick and nice output is always good to have.


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 :




On this output is shown :
  • 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
 If you run Exadatas before X8M, note that the exa-versions.sh script is not based on any [dbs|cell|ib]_group file; indeed it relies on the ibswitches and ibhosts commands then you do not have to mind about the [dbs|cell|ib]_group files.

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:



Please keep in mind that you need to use the script /opt/oracle.SupportTools/RoCE/setup_switch_ssh_equiv.sh to set up the passwordless connectivity to the ROCE switches.

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 !


6 comments:

  1. I cannot execute ibhosts, ibswitches etc.. from Exadata DB server. Do you have any other way where this script can be run from DB server?

    ReplyDelete
    Replies
    1. Do you mean that you cannot connect as root ?

      Delete
  2. From where I can download these handy scripts?

    ReplyDelete
    Replies
    1. At 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.

      Delete
  3. Thanks for the useful scripts.The colors work in Putty but not SecureCRT. What do I need to change to get it working

    ReplyDelete

Load 2 billion rows with SQL LOADER

I worked on few Extract data / transform data (nor not) / load data into an Oracle database projects during my professional life and SQL ...