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. And as things progress quickly, and we have smart developers in the upgrade team, I had to refresh this blog post soon after. See below …
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.
And at first stage, my colleague Meir Burmanov told me about the state.html file and recommended to start a simple web server such as python -m SimpleHTTPServer 8000 .
It is even more simple
Once my team mates saw this, they quickly implemented a tiny change – and since then you don’t need a webserver to be started anymore. You simply pass this into your browser’s address line:
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.
Further Information and Links
- AutoUpgrade – Where are all the logfiles?
- Oracle Database 19c Upgrade Guide – Logfile Structure
- Python for Beginners – How to use SimpleHTTPServer
Just wanted to know if the autoupgrade.jar has the feature to change user.
We have setup where we have different users for different versions of database.
So one option is I can run analyze and fixup with one user and then run upgrade with other user.
But is there way where I can simply run deploy and autoupgrade can switch user when it drains and starts upgrade with new user.
there is no such feature in AU.
It has to run within the user context of the owner of the home.
That’s curious . I din’t find the state.html while running an autoupgrade analyze command (windows) .
is it maybe shown only durring a deploy ?
It is there – I double-checked:
C:\Users\xyz.ORADEV> dir c:\tmp\logs\state.html/s
Volume in drive C is System
Volume Serial Number is 90DF-310C
Directory of c:\tmp\logs\cfgtoollogs\upgrade\auto
07/09/2020 12:45 PM 12,833 state.html
1 File(s) 12,833 bytes
Total Files Listed:
1 File(s) 12,833 bytes
0 Dir(s) 684,339,539,968 bytes free
Thank you so much Mike . almost a year later but I blame it on the notifications 🙂 .
Indeed it’s inside
I was stuck on status.html for long while which I thought had the info
the status has the info only after the whole job is done.
Thank you again for the help and great job with the tool am a fan