How can I monitor the progress of a slow upgrade?
The upgrader builds a queue of version-specific upgrade tasks -- then executes them. You can measure progress based on the size of the queue.

If you use the web-based upgrader, it displays a progress-bar based on the queue.

If you use the CLI to upgrade the DB, then it doesn't display a progress-bar. However, it would be patch-welcome to add something. (If I were doing this, I'd write a cv upgrade command which borrows heavily from http://symfony.com/doc/current/components/console/helpers/progressbar.html and https://github.com/civicrm/civicrm-core/blob/master/CRM/Upgrade/Headless.php).

If you're looking for ways to poke under the hood, then you can look at SQL tables civicrm_domain and civicrm_queue_item. I wouldn't recommend building external processes on these, but they could be good for a quick peek. These (untested) queries should be interesting:


select count(*) from civicrm_queue_item where queue_name  = 'CRM_Upgrade' (the queue gets smaller as tasks progress)
select version from civicrm_domain (updates to reflect the most recent incremental update)