I’ve re-coded the gather statistics shell script for Oracle to run in nohup mode by default, thereby allowing the DBA to close the session without interrupting the gather statistics operation.
Script download link:
https://www.dropbox.com/s/fku4hf082xah1bm/gather_stats.sh?dl=0
For more details on how to use the script, please visit the original post:
http://dba-tips.blogspot.com/2014/09/script-to-ease-gathering-statistics-on.html
And here is the GitHub version:
rocking script.