Estimate the mainnet service window left for a zcashd release
A zcashd release can have a mainnet end-of-service block height. Monitoring disk and process uptime alone will miss this scheduled halt.
Read the running binary's deadline
On the same mainnet instance read the end-of-service object and the current block count. Use the declared block_height for the running subversion. Testnet and regtest can omit the object.
zcash-cli getdeprecationinfo | jq '{subversion, end_of_service}'
zcash-cli getblockcount
Alert on blocks remaining
If the deadline is 100,000 and the node is at 98,500, there are 1,500 blocks to the boundary in this illustrative example. An estimated Unix time is also available but shifts with block production. Re-read the field after upgrading to verify the new binary's actual service horizon.