[Info-vax] Uptime for OpenVMS

jbriggs444 jbriggs444 at gmail.com
Thu May 12 08:30:26 EDT 2011


On May 11, 12:56 pm, JF Mezei <jfmezei.spam... at vaxination.ca> wrote:
> OK, in light of Bill Gunshannon's 4000 day uptime, I wanted to "edit"
> the output of SHOW SYSTEM....
>
> VMS Alpha 8.3:
>
> $START = "17=NOV-1858 01:00:00"
> $END = F$TIME()
> $write sys$output f$delta_time(start,end)
>
> %SYSTEM-F-IVTIME, invalid time
>
> If I change "start" to have a date last year, it works.
>
> Note that by having it at 01:00:00, it means that "start" isn't set to
> "0" and should not be considered a deltatime.
>
> Is this due to a 32 bit limitation in DCL that would not allow a
> delta-time greater than 32 bits ?

It's a limitation is built into the VMS operating system routines,
SYS$BINTIM and SYS$ASCTIM.  This limitation was carried
over and documented for certain run time library routines such
as LIB$ADD_TIMES and LIB$SUB_TIMES.

The limitation is that delta times may not represent intervals
greater than 9999 days.  This was known at one time as the
D10K problem.

I have strong opinions on the level of intelligence implied by
the D10K behavior in the relevant vintage of the VMS RTL.
The RTL enforced the 9999 day limit on delta times not
just for input/output, but also for internal arithmetic in
routines such as LIB$ADD_TIMES and LIB$SUB_TIMES.

http://www.b2systems.com/support/delta.html

But I digress.

The output format for a VMS delta time has four digits for
day number and no provision for overflow.  If you try to print
out a delta time for an interval of some 50,000+ days, it
won't fit.  That is, I believe, the problem you report above.

However, there is another issue with your calculation.  VMS
uptime is not properly computed by subtracting the boot time
from the current time.  It is properly computed by looking
at EXE$GL_ABSTIME (in seconds).

Assuming unsigned arithmetic, the former puts a limit of
49,710 days (136 years) of uptime on any VMS system
in which ABSTIME is maintained in an unsigned 32 bit cell.

The question of signed versus unsigned arithmetic is
largely academic since we haven't had any systems up
for 68 years yet and because...

My recollection is that "SHOW SYSTEM" uses the incorrect
computation for uptime and does, in fact, subtract boot time
from time now.  This can give rise to absolute times showing
up in the "SHOW SYSTEM" uptime display if you change
the system clock backward far enough.



More information about the Info-vax mailing list