Check it out:
@_uptiME.EXE.2_
TOMMYT up for 1 Year, 2 Days, 16 Hours, 36 Minutes, 26 Seconds and
582 Milliseconds
@_timET2.EXE.4 _
Tops-20 was booted on Saturday, January 16, 2021 8:46:38PM-EST.
It will crash with an UP2LNG BUGHLT on Friday, February 18, 2022
1:08:57PM-EST.
@
UPTIME and TIMET2 are two programs that I wrote several years; ago,
UPTIME in 2017 and TIMET2 in 2006.? I wrote them because I found the
hours format given by SYSTAT SYSTEM and INFORMATION MONITOR-STATISTICS
to be a little opaque and they didn't have the information I wanted, viz:
@_sysTAT sySTEM_
?Tue 18-Jan-2022 13:28:45? Up *8800:42:07!!!!!!!!*
?4+7 Jobs?? Load av?? 0.01?? 0.02?? 0.02
?No operator in attendance
@_iNFORMATION (ABOUT) monITOR-STATISTICS_
?Up *8800:42:10!!!!!!!!*
?Idle 99%? Waiting 0%? Sched ovh 0%? Pager traps 0%
?Swap reads 28049 Writes 385176? File reads 4643699 Writes 3677925
?8092 Pages of user memory
?4259771001 Term wakeups? 1255 Term interrupts
?NBAL av?? 0.32? NRUN av?? 0.02
?Runtime of jobs on sched queues 0-6 (sec)
?? ?143964??? 16409??? 14494??? 1012??? 1756 4846??? 4215
@
I wrote TIMET2 because I needed to know when to set a shutdown. If you
don't do that and you hit the uptime limit, then the machine simple
crashes with an UP2LNG BUGHLT. This happens because the uptime
millisecond counter is a signed 36 bit integer, which will roll over and
become negative after 1 Year, 4 Weeks, 5 Days, 16 Hours, 22 Minutes, 18
Seconds and 367 Milliseconds.? You would think the code would self-set a
'graceful' shutdown, but it doesn't...? Maybe I'll do that one of these
days; it's easy enough.
Since the PDP-10 does not have unsigned compares, fixing this would
involve changing a rather large number of comparisons. Assuming you kept
the storage at a single word, going unsigned would get you out to 2
Years, 9 Weeks, 4 Days, 8 Hours, 44 Minutes, 36 Seconds and 735
Milliseconds.? That's probably still not that great given today's hardware.
Going to an unsigned double word format would obviously get you a far
larger uptime.? However, the current arithmetic that I use can 'only'?
handle a maximum uptime of 34,359,738,367,999 of milliseconds.? This
works out to be 1092 Years, 27 Weeks, 5 Days, 3 Hours, 46 Minutes, 7
Seconds and 999 Milliseconds.? Since the time of day counter expires in
7-Aug-2576 7:59:59 PM EDT, I used a faster instruction...? Otherwise,
going over a millennium between reboots seemed reasonable unless you
find yourself in a significantly sub-luminal spacecraft going someplace
inter-galactic...
I know that XKL fixed at least part of the uptime problem, but I don't
remember what that limit is.? What are the limits for other systems?