rac-status.sh has been widely used in the last years and I am often contacted for various questions thus this below FAQ to make it easier for everyone. This comes on top of the rac-status.sh features description post and the rac-status.sh what's new post.
Which user should I use to run rac-status.sh ?
root or oracle; both work.
Are there some pre-requisites ?
rac-status.sh can read information from Oracle Grid Infrastructure from version 11g; I have also recently implemented the PDB information which is a new GI 21c feature so we can assume that it runs on pretty much any GI version out there.
One thing though is that when I have developped the PDB support (GI 21c new feature), I have used awk (gawk) multidimensionnal arrays which is a "new" feature introduced with gawk 4 which has been released in 2012 (yes, 10 years ago). Unfortunately, it seems that RH6/OEL6 ships gawk 3.1.7 released in ... 2009.
So the version supporting the PDBs for GI 21c creates a syntax error on old systems like RH6/OEL6. As RH6/OEL6 should die soon (Oracle 19 pre-requisites is RH7/OEL7), I haven't redevelopped this part but instead kept a version for RH6/OEL6 which you can find here. Also in the Scripts menu under the name rac-status-rh6.sh.
Does rac-status.sh also work with Oracle Restart ?
Yes.
How does rac-status.sh get the information it shows ?
rac-status.sh collects information from the GI using crsctl commands (you can check the code itself to see what is done exactly, also this post may be of interest about crsctl syntax and optimization).
is rac-status.sh intrusive ? does it modifies something on my system ?
No. rac-status.sh just reads information from GI and makes a nice table depending on the options choosen.
How can I know which options are available ?
Use the -h option:
Does rac-status.sh support long options ? (--help instead of -h)
No. I wrote many scripts supporting long options and there are still OS like Solaris and AIX not fully/correctly supporting long options (not having the same getopt command as Linux).
So as rac-status.sh is very well spread, I wouldn't want to break it for these guys (they already have to work with these dinosaur OS, they do not need more trouble in their life :p).
Which OS are supported ?
I develop on Linux (Exadata mainly) and guys using Solaris, AIX or HP-UX haved contacted me over the time when something was not working on their OS. I now roughly know what is not working on Solaris or AIX so I naturally accomodate so rac-status.sh is 100% running on Linux (see above, there is a dedicated version for RH6/OEL6) and should be all good on the other Unixes with Oracle on it. If not, let me know and I'll fix it.
Could you please clarify the -C option?
From rac-status.sh -h:
When I started to dev rac-status.sh, all my clients had this kind of naming convention:
This is for this purpose that I introduced the -C option to basically enter a "fake cluster name" or a "custom cluster name" which is not really the name of the cluster but the part you want to remove from the names of your DB nodes.
So the algorithm is as below:
I found a bug, what should I do ?
You can fix it yourself and make a pull request on my git repo, you can also contact me (Linkedin chat, email) or post a comment in the rac-status.sh post and I'll fix it. Please read What information should I provide for you to investigate a bug ? before contacting me to help speeding up the resolution.
What information should I provide for you to investigate a bug ?
Run rac-status.sh with the below options:
I would like a new feature, what should I do ?
Please check using the -h option that it does not already exist; if not, please follow the same procedure as for a bug.
How long does it take to have a new feature or a bug fixed ?
Keep in mind that this is not my job, I do all this blog and script dev/maintenance/sharing during my extra time. I always try to be as responsive as possible but I have to work for my employer first (you know, to pay a mortgage, buy shoes to the kids, stuff like that :)). I always do my best on that regards though !
I have a question not listed here !
Just post it in the comment below and I'll add it to this list !
- What is rac-status.sh ? rac-status.sh is a bash script showing the status of an Oracle Grid Infrastructure configuration resources (DB, Listeners, Services, PDBs (if GI >=21c), technical resources as well). You can find detailed information and screenshots here.
- Is rac-status.sh an official Oracle tool? No. I joined Oracle as an employee in 2022. I dev rac-status.sh far before I joined Oracle and my job at Oracle is different. rac-status.sh is something I do on my own on my free time. rac-status.sh is not an Oracle official tool.
- Is it free to use rac-status.sh ? rac-status.sh is totally free and under the GPLv3 licence. You can use it for free for professionnal needs as you would use any other software under GPLv3 like the tons of tools available on the Linux distribution you use on a daily basis.
- Where can I get rac-status.sh ? The lastest version is always in my git repo which you can clone and pull as much as you want. You can also get the source code (this is also true for all the other scripts I dev, maintain and share) from the Scripts menu on top of each page as shown below:
- How do I run rac-status.sh ? Ensure it is executable and just ./ it:
$ chmod u+x rac-status.sh $ ./rac-status.sh
One thing though is that when I have developped the PDB support (GI 21c new feature), I have used awk (gawk) multidimensionnal arrays which is a "new" feature introduced with gawk 4 which has been released in 2012 (yes, 10 years ago). Unfortunately, it seems that RH6/OEL6 ships gawk 3.1.7 released in ... 2009.
So the version supporting the PDBs for GI 21c creates a syntax error on old systems like RH6/OEL6. As RH6/OEL6 should die soon (Oracle 19 pre-requisites is RH7/OEL7), I haven't redevelopped this part but instead kept a version for RH6/OEL6 which you can find here. Also in the Scripts menu under the name rac-status-rh6.sh.
$ ./rac-status.sh -hAlternatively, you can also check the the rac-status.sh features description post which showcases the options in a detailed manner and also shows some screnshots.
So as rac-status.sh is very well spread, I wouldn't want to break it for these guys (they already have to work with these dinosaur OS, they do not need more trouble in their life :p).
-C Use the string provided to -C to shorten the hostnames if the default shortening method does not suit you. By default, we remove everything before a "db" pattern in the hostnames (dbproddb01 becomes db01); if your hosts do not contain "db" in their names, use -C to shorten as you wish. As an example, if your hosts are named oracleprod01, oracleprod02, etc... using -C oracle would shorten the names to prod01, prod02, etc...This may need some more clarification though:
When I started to dev rac-status.sh, all my clients had this kind of naming convention:
- Cluster name: crsprd
- DB nodes: crspdrdb01, crsprddb02, etc...
- Cells: crsprdcel01, etc...
- some people have cluster names with a name which is totally different than the DB nodes or the cells
- some people have DB nodes without "db" in their names
This is for this purpose that I introduced the -C option to basically enter a "fake cluster name" or a "custom cluster name" which is not really the name of the cluster but the part you want to remove from the names of your DB nodes.
So the algorithm is as below:
- option -L: you do not want to shorten your names => we do not do anything special, long names are used and shown
- - not -L: we want the short names:
- 1/ if no -C is specified, we remove everything before "db" to shorten the names => dbproddb01 will become db01 (but the cluster name shown in the header comes from "olsnodes -c" and is not changed at all, this is the real name of your cluster)
- 2/ if -C is specified we remove this value from the DB nodes as kind of "fake cluster name" like if it was the naming convention I described earlier
# ./rac-status.sh -a -o fileforfred.txtAnd send me this fileforfred.txt file with the description of the issue.
Hello,
ReplyDeleteI got this error but i couldnt figure it why ?
Cluster cluster-bidb is a X7-2 Eighth Rack HC 10TB (upgrade state is NORMAL)
awk: cmd. line:279: pdb[temppdb[1]][temppdb[2]] = PDB ;
awk: cmd. line:279: ^ syntax error
awk: cmd. line:279: pdb[temppdb[1]][temppdb[2]] = PDB ;
awk: cmd. line:279: ^ syntax error
awk: cmd. line:789: for (x in pdb[l_db]) {tempopdb[x]=x;} ;
awk: cmd. line:789: ^ syntax error