Twitter

rac-status.sh : now shows the services (and more)

rac-status.sh now shows the services (and more)
Please find a screenshot below :



The services are not shown by default (default shows the listeners and the databases); you have 2 ways to modify the default behavior:
1/ Modify the default variables in the script :
  SHOW_DB="YES"                 # Databases
 #SHOW_DB="NO"
SHOW_LSNR="YES"                 # Listeners
#SHOW_LSNR="NO"
 SHOW_SVC="YES"                 # Services
 SHOW_SVC="NO"

2/ Use one of the option I implemented to show / hide part of the output depending on your needs; please find the usage function for information on how to use these options :
$ ./rac-status.sh -h

NAME
        rac-status.sh - A nice overview of databases, listeners and services running across a GI 12c

SYNOPSIS
        ./rac-status.sh [-a] [-n] [-d] [-l] [-s] [-h]

DESCRIPTION
        rac-status.sh needs to be executed with a user allowed to query GI using crsctl; oraenv also has to be working
        rac-status.sh will show what is running or not running accross all the nodes of a GI 12c :
                - The databases instances (and the ORACLE_HOME they are running against)
                - The type of database : Primary, Standby, RAC One node, Single
                - The listeners (SCAN Listener and regular listeners)
                - The services
        With no option, rac-status.sh will show what is defined by the variables :
                - SHOW_DB       # To show the databases instances
                - SHOW_LSNR     # To show the listeners
                - SHOW_SVC      # To show the services
                These variables can be modified in the script itself or you can use command line option to revert their value (see below)


OPTIONS
        -a        Show everything regardless of the default behavior defined with SHOW_DB, SHOW_LSNR and SHOW_SVC
        -n        Show nothing    regardless of the default behavior defined with SHOW_DB, SHOW_LSNR and SHOW_SVC
        -d        Revert the behavior defined by SHOW_DB  ; if SHOW_DB   is set to YES to show the databases by default, then the -d option will hide the databases
        -l        Revert the behavior defined by SHOW_LSNR; if SHOW_LSNR is set to YES to show the listeners by default, then the -l option will hide the listeners
        -s        Revert the behavior defined by SHOW_SVC ; if SHOW_SVC  is set to YES to show the services  by default, then the -s option will hide the services
        -h        Shows this help

        Note : the options are cumulative and can be combined with a "the last one wins" behavior :
                $ ./rac-status.sh -a -l              # Show everything but the listeners (-a will force show everything then -l will hide the listeners)
                $ ./rac-status.sh -n -d              # Show only the databases           (-n will force hide everything then -d with show the databases)

                Experiment and enjoy  !



I also have implemented few cool things with this update :
  • Short names for hostnames are now shown in the tables' headers instead of the whole hostnames (when possible); this makes the output more visible
  • The name of the cluster is now shown on top of the tables
  • The columns are dynamically adjusted to keep everything aligned depending on the largest information we show
  • The columns where are shown the status are adjusted depending on how many nodes you have -- indeed, in the case of a full rack we have many information to show
  • In the case of many ports listened by some listeners, they are shown outside of the table after the last column to not mess up the nice alignment then it stays clear
  • Databases names are now left aligned, the center alignment was not really clear
  • I have shorten some status like "Shutdown" instead of "Instance Shutdown" or "Readonly" instead of "Open,Readonly" then it stays clear and take less room on the screen (very nice for big implementations)
  • Try and experiment the options, you can combine them to show what you want regardless of the default defined in the script, it is very handy !

The original post on rac-status.sh is still valid with a detailed description on how to use this script. You can also still download rac-status.sh here

Enjoy ! and please let me know if you find any bug or have any question.

2 comments:

  1. Hi Fred, Greetings !

    I'm getting below error while executing

    $ sh rac-status.sh
    rac-status.sh: line 161: syntax error near unexpected token `$'in\r''
    'ac-status.sh: line 161: `case ${OS} in

    ReplyDelete
    Replies
    1. Hi,

      Do not sh it, just ./ it:

      ./rac-status.sh

      Regards,

      Delete

CUDA: Getting started on Google Colab

While getting started with CUDA on Windows or on WSL (same on Linux) requires to install some stuff, it is not the case when using Google...