I have heard and received this question several times. And I always pointed people to the status logs in AutoUpgrade’s logging directory. But I wasn’t aware how simple the monitoring can be. Kudos to my colleague Meir Burmanov from Oracle Israel for explaining me today how you can simply monitor AutoUpgrade: Refresh Status Information automatically.
Like it – and it’s very simple
This won’t be a long blog post. And maybe there are even more fancier ways to do the monitoring. But for me it does the job. And it is super simple. Plus, I learned something new 🙂
AutoUpgrade writes not only log information for each job but also information which applies to the entire run. And one of these files is the state.html which gets updated over and over again during an upgrade run. Now you can monitor this file – but as it is an HTML file, it is best done with a simple web server. Thanks again to Meir Burmanov for showing me this:
In this directory you will find the state.html file.
Now you start a python webserver in this directory (you can choose your port – standard is 8000):
python -m SimpleHTTPServer 8000
And then you open your browser, and access simply:
That’s it. And it refreshes automatically.
Not the most fancy output but it does what it’s supposed to do.
But this way you don’t have to type “lsj” a hundred times.
Just don’t forget to CTRL-C, as otherwise you’ll have ongoing messages in your xterm such as:
- 127.0.0.1 – – [15/Jul/2020 19:45:07] “GET /state.html HTTP/1.1” 200 –
127.0.0.1 – – [15/Jul/2020 19:45:12] “GET /state.html HTTP/1.1” 200 –
Further Information and Links
- AutoUpgrade – Where are all the logfiles?
- Oracle Database 19c Upgrade Guide – Logfile Structure
- Python for Beginners – How to use SimpleHTTPServer