Automated sundiag.sh for Exadata nodes

We recently had to collect sundiag.sh output to one of our Service Requests and I followed note “Oracle Exadata Diagnostic Information required for Disk Failures and some other Hardware issues (Doc ID 761868.1)“.

And while there isn’t too much of work involved I thought perhaps I could reduce few steps. Below is short script which creates folder to /tmp under running node (I use first database node), runs sundiag.sh via dcli on all nodes based on all_group file, downloads those files to running node and creates new archived file which you can upload to Service Request.

Before you run this you need to setup ssh equivalency across all the nodes.

Output when you run it looks like this:


[root@exa1dbadm01 diag]# sh get_sundiag_from_all_nodes.sh
Tue Jan 10 11:54:11 CET 2017: Getting sundiag scripts from all nodes
Tue Jan 10 11:54:11 CET 2017: /tmp/sundiag_output_20170110 exists
Tue Jan 10 11:54:11 CET 2017: Compressing old sundiag files and removing them exa1dbadm01: adding: var/log/exadatatmp/sundiag_exadbadm01_XXXXXXXXX_2017_01_10_11_46.tar.bz2 (deflated 1%)
exa1dbadm02: adding: var/log/exadatatmp/sundiag_exa1dbadm02_XXXXXXXXX_2017_01_10_11_46.tar.bz2 (deflated 1%)
exa1celadm01: adding: var/log/exadatatmp/sundiag_exa1celadm01_XXXXXXXXX_2017_01_10_11_46.tar.bz2 (deflated 2%)
exa1celadm02: adding: var/log/exadatatmp/sundiag_exa1celadm02_XXXXXXXXX_2017_01_10_11_46.tar.bz2 (deflated 1%)
exa1celadm03: adding: var/log/exadatatmp/sundiag_exa1celadm03_XXXXXXXXX_2017_01_10_11_46.tar.bz2 (deflated 1%)
Tue Jan 10 11:54:13 CET 2017: Running dcli sundiag.sh on all nodes
sundiag_output_20170110/sundiag_exa1celadm01_XXXXXXXXX_2017_01_10_11_54.tar.bz2
sundiag_output_20170110/sundiag_exa1celadm02_XXXXXXXXX_2017_01_10_11_54.tar.bz2
sundiag_output_20170110/sundiag_exa1celadm03_XXXXXXXXX_2017_01_10_11_54.tar.bz2
sundiag_output_20170110/sundiag_exa1dbadm01_XXXXXXXXX_2017_01_10_11_54.tar.bz2
sundiag_output_20170110/sundiag_exa1dbadm02_XXXXXXXXX_2017_01_10_11_54.tar.bz2
Tue Jan 10 11:59:04 CET 2017: Combined tar file of /tmp/sundiag_output_20170110 created as /tmp/exa_rack_sundiag_20170110_115839.tar.bz2
Tue Jan 10 11:59:04 CET 2017: You can review the logfile /tmp/sundiag_output_20170110/diagnostics_output_20170110.log for errors. All done now. Have a great day.

You can download the script from here.

Thoughts on this?

I have script under work which would run also ILOM snapshot through sundiag.sh if the ilom node is up but it needs to be done on different method as you need to supply root password during execution.

 

 

Simo

Recent Posts

Helping to troubleshoot with OCI VCN Flow Logs

I'm a huge fan of using tools available to help troubleshoot any issues there are.…

3 days ago

OCI Routing checklist when using 3rd party firewall

This post will be checklist for items you'll need when you have Firewall (or Hub)…

1 year ago

OCI ExaCS Database Upgrade Rollback

Recently I was testing OCI database upgrade from 12c to 19c and ran into an…

1 year ago

Issues with OCI ExaCS PDB cloning

This is mostly just to document if you hit similar issues and how to get…

1 year ago

OCI Tips and Tricks – Managed MySQL Database in OCI (and trying out Heatwave)

Here I'm looking on how to provision MySQL DB on OCI, see how read replicas…

1 year ago

OCI Tips and Tricks: Create 19c Oracle Database (and manage it)

This time I go over on how to create 19c Oracle Database on OCI (hint:…

1 year ago