Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Henry Crun <mike@rechtman.com> |
|---|---|
| Newsgroups | comp.os.vms |
| Subject | Re: Uptime for OpenVMS |
| Date | 2011-05-12 18:41 +0300 |
| Organization | albasani.net |
| Message-ID | <9mbt98-36g.ln1@Ubuntu.mike-r.com> (permalink) |
| References | (1 earlier) <d768c138-27f6-40fb-8248-57a4e5aea13c@y31g2000vbp.googlegroups.com> <92vg53FsidU2@mid.individual.net> <iqed6e$r45$2@Iltempo.Update.UU.SE> <4dcabfc1$0$28807$c3e8da3$c8b7d2e6@news.astraweb.com> <35fbb912-a0d3-4719-beb0-7221acd3d9f0@f11g2000vbx.googlegroups.com> |
On 12/05/11 15:30, jbriggs444 wrote:
> On May 11, 12:56 pm, JF Mezei<jfmezei.spam...@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.
Found "among my souvenirs' : (look out for line wrap)
---------------------<start code>-------------------------------
.title get system up time
.link /sys$system:sys.stb/
;
; for Alpha: link/SYSEXE
;
; Macro to setup calling sub-routine
;
.macro call_division dvsr, dvdent, quot, remainder
pushl dvsr
pushl dvdent
pushal quot
pushal remainder
calls #4, division
.endm call_division
.psect data, long, wrt, noexe
up_sec: .long 0
hrs: .long 0
min: .long 0
sec: .long 0
day: .long 0
sec_remain:.long 0
min_remain:.long 0
hrs_remain:.long 0
q_tmp: .quad 0
sixty: .long 60
hrs_in_day:.long 24
ctrstr: .ascid /System has been up for !UL day!%S, !UL hour!%S, <<<- line wrap!
!UL minute!%S and !UL second!%S/
outdesc: .long 80
.address outstr
outstr: .blkb 80
outlen: .long 0
.psect code, long, exe
.entry uptime,0
movl g^exe$gl_abstim, up_sec
;
; Calculate number of minutes and store remaining seconds
;
cal_min:
call_division sixty, up_sec, min, sec_remain
cmpl min, #0
beql skip
;
; Calculate number of hours and store remaining minutes
;
cal_hrs:
call_division sixty, min, hrs, min_remain
cmpl hrs, #0
beql skip
;
; Calculate number of days and store remaining hours
;
cal_day:
call_division hrs_in_day, hrs, day, hrs_remain
; cmpl hrs, #0
; beql skip
;
; Format the output string to be printed out
;
skip:
$fao_s ctrstr=ctrstr, -
outlen=outlen, -
outbuf=outdesc, -
p1=day,-
p2=hrs_remain,-
p3=min_remain,-
p4=sec_remain
movl outlen, outdesc
pushal outdesc
calls #1, g^lib$put_output
ret
;
; Routine to do the divisions
;
.entry division, ^m<>
clrq q_tmp
movl 4(ap), r5 ;remainder
movl 8(ap), r6 ;quotient
movl 12(ap), q_tmp ;dividend
movl 16(ap), r8 ;divisor
ediv r8, q_tmp, (r6), (r5)
ret
.end uptime
---------------------------<end code>----------------------------
--
Mike R.
Home: http://alpha.mike-r.com/
QOTD: http://alpha.mike-r.com/php/qotd.php
No Micro$oft products were used in the URLs above, or in preparing this message.
Recommended reading: http://www.catb.org/~esr/faqs/smart-questions.html#before
Back to comp.os.vms | Previous | Next — Previous in thread | Next in thread | Find similar
Uptime for OpenVMS abrsvc <dansabrservices@yahoo.com> - 2011-05-10 11:54 -0700
Re: Uptime for OpenVMS Marc Schlensog <mschlens+news@gmail.com> - 2011-05-10 21:11 +0200
Re: Uptime for OpenVMS abrsvc <dansabrservices@yahoo.com> - 2011-05-10 12:23 -0700
Re: Uptime for OpenVMS koehler@eisner.nospam.encompasserve.org (Bob Koehler) - 2011-05-10 15:59 -0500
Re: Uptime for OpenVMS Paul Sture <paul.nospam@sture.ch> - 2011-05-11 13:59 +0200
Re: Uptime for OpenVMS Rich Jordan <jordan@ccs4vms.com> - 2011-05-10 16:21 -0700
Re: Uptime for OpenVMS Rich Jordan <jordan@ccs4vms.com> - 2011-05-13 09:59 -0700
Re: Uptime for OpenVMS Neil Rieck <n.rieck@sympatico.ca> - 2011-05-11 03:38 -0700
Re: Uptime for OpenVMS koehler@eisner.nospam.encompasserve.org (Bob Koehler) - 2011-05-11 07:32 -0500
Re: Uptime for OpenVMS billg999@cs.uofs.edu (Bill Gunshannon) - 2011-05-11 13:04 +0000
Re: Uptime for OpenVMS "Richard B. Gilbert" <rgilbert88@comcast.net> - 2011-05-11 17:20 -0400
Re: Uptime for OpenVMS BillPedersen <pedersen@ccsscorp.com> - 2011-05-11 04:01 -0700
Re: Uptime for OpenVMS billg999@cs.uofs.edu (Bill Gunshannon) - 2011-05-11 13:09 +0000
Re: Uptime for OpenVMS JF Mezei <jfmezei.spamnot@vaxination.ca> - 2011-05-11 09:15 -0400
Re: Uptime for OpenVMS billg999@cs.uofs.edu (Bill Gunshannon) - 2011-05-11 14:55 +0000
Re: Uptime for OpenVMS ChrisQ <meru@devnull.com> - 2011-05-17 16:22 +0100
Re: Uptime for OpenVMS helbig@astro.multiCLOTHESvax.de (Phillip Helbig---undress to reply) - 2011-05-17 18:35 +0000
Re: Uptime for OpenVMS Keith Parris <keithparris_deletethis@yahoo.com> - 2011-05-17 14:15 -0600
Re: Uptime for OpenVMS ChrisQ <meru@devnull.com> - 2011-05-17 22:48 +0100
Re: Uptime for OpenVMS seasoned_geek <roland@logikalsolutions.com> - 2011-05-21 08:54 -0700
Re: Uptime for OpenVMS Paul Sture <paul.nospam@sture.ch> - 2011-05-25 10:30 +0200
Re: Uptime for OpenVMS moroney@world.std.spaamtrap.com (Michael Moroney) - 2011-05-17 23:19 +0000
Re: Uptime for OpenVMS Paul Sture <paul.nospam@sture.ch> - 2011-05-18 11:25 +0200
Re: Uptime for OpenVMS MG <marcogbNO@SPAMxs4all.nl> - 2011-05-17 20:41 +0200
Re: Uptime for OpenVMS "Richard B. Gilbert" <rgilbert88@comcast.net> - 2011-05-17 16:37 -0400
Re: Uptime for OpenVMS MG <marcogbNO@SPAMxs4all.nl> - 2011-05-17 22:47 +0200
Re: Uptime for OpenVMS ChrisQ <meru@devnull.com> - 2011-05-17 22:33 +0100
Re: Uptime for OpenVMS koehler@eisner.nospam.encompasserve.org (Bob Koehler) - 2011-05-18 09:54 -0500
Re: Uptime for OpenVMS Paul Sture <paul.nospam@sture.ch> - 2011-05-21 06:45 +0200
Re: Uptime for OpenVMS koehler@eisner.nospam.encompasserve.org (Bob Koehler) - 2011-05-18 09:50 -0500
Re: Uptime for OpenVMS seasoned_geek <roland@logikalsolutions.com> - 2011-05-21 08:25 -0700
Re: Uptime for OpenVMS koehler@eisner.nospam.encompasserve.org (Bob Koehler) - 2011-05-18 09:44 -0500
Re: Uptime for OpenVMS "Richard B. Gilbert" <rgilbert88@comcast.net> - 2011-05-18 11:15 -0400
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-18 09:30 -0700
Re: Uptime for OpenVMS "Richard B. Gilbert" <rgilbert88@comcast.net> - 2011-05-18 21:08 -0400
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-18 19:13 -0700
Re: Uptime for OpenVMS MG <marcogbNO@SPAMxs4all.nl> - 2011-05-19 11:31 +0200
Re: Uptime for OpenVMS Paul Sture <paul.nospam@sture.ch> - 2011-05-23 13:10 +0200
Re: Uptime for OpenVMS "Syltrem" <syltremzulu@videotron.ca> - 2011-05-19 13:22 -0400
Re: Uptime for OpenVMS John Wallace <johnwallace4@yahoo.co.uk> - 2011-05-19 10:53 -0700
Re: Uptime for OpenVMS Paul Sture <paul.nospam@sture.ch> - 2011-05-21 06:36 +0200
Re: Uptime for OpenVMS koehler@eisner.nospam.encompasserve.org (Bob Koehler) - 2011-05-18 11:59 -0500
Re: Uptime for OpenVMS Single Stage to Orbit <alex.buell@munted.org.uk> - 2011-05-11 16:43 +0100
Re: Uptime for OpenVMS JF Mezei <jfmezei.spamnot@vaxination.ca> - 2011-05-11 12:47 -0400
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-11 10:23 -0600
Re: Uptime for OpenVMS John Wallace <johnwallace4@yahoo.co.uk> - 2011-05-11 09:48 -0700
Re: Uptime for OpenVMS billg999@cs.uofs.edu (Bill Gunshannon) - 2011-05-11 17:01 +0000
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-11 11:02 -0600
Re: Uptime for OpenVMS glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-05-11 18:13 +0000
Re: Uptime for OpenVMS billg999@cs.uofs.edu (Bill Gunshannon) - 2011-05-11 18:46 +0000
Re: Uptime for OpenVMS glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-05-11 18:59 +0000
Re: Uptime for OpenVMS billg999@cs.uofs.edu (Bill Gunshannon) - 2011-05-11 19:12 +0000
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-11 17:28 -0600
Re: Uptime for OpenVMS billg999@cs.uofs.edu (Bill Gunshannon) - 2011-05-12 00:06 +0000
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-11 18:37 -0600
Re: Uptime for OpenVMS glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-05-12 09:08 +0000
Re: Uptime for OpenVMS koehler@eisner.nospam.encompasserve.org (Bob Koehler) - 2011-05-12 08:36 -0500
Re: Uptime for OpenVMS billg999@cs.uofs.edu (Bill Gunshannon) - 2011-05-12 14:12 +0000
Re: Uptime for OpenVMS Bob Eager <rde42@spamcop.net> - 2011-05-11 19:26 +0000
Re: Uptime for OpenVMS billg999@cs.uofs.edu (Bill Gunshannon) - 2011-05-11 20:40 +0000
Re: Uptime for OpenVMS Bob Eager <rde42@spamcop.net> - 2011-05-11 21:12 +0000
Re: Uptime for OpenVMS Single Stage to Orbit <alex.buell@munted.org.uk> - 2011-05-11 23:33 +0100
Re: Uptime for OpenVMS Bob Eager <rde42@spamcop.net> - 2011-05-12 05:49 +0000
Re: Uptime for OpenVMS Steve Thompson <smt@vgersoft.com> - 2011-05-12 16:56 -0400
Re: Uptime for OpenVMS glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-05-13 01:21 +0000
Re: Uptime for OpenVMS Bob Eager <rde42@spamcop.net> - 2011-05-13 06:01 +0000
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-13 00:54 -0600
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-13 01:13 -0600
Re: Uptime for OpenVMS Bob Eager <rde42@spamcop.net> - 2011-05-13 07:32 +0000
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-13 01:49 -0600
Re: Uptime for OpenVMS Bob Eager <rde42@spamcop.net> - 2011-05-13 08:45 +0000
Re: Uptime for OpenVMS Steve Thompson <smt@vgersoft.com> - 2011-05-13 11:38 -0400
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-13 11:18 -0600
Re: Uptime for OpenVMS moroney@world.std.spaamtrap.com (Michael Moroney) - 2011-05-13 17:24 +0000
Re: Uptime for OpenVMS JF Mezei <jfmezei.spamnot@vaxination.ca> - 2011-05-13 13:38 -0400
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-13 12:45 -0600
Re: Uptime for OpenVMS "Richard B. Gilbert" <rgilbert88@comcast.net> - 2011-05-13 15:11 -0400
Re: Uptime for OpenVMS JF Mezei <jfmezei.spamnot@vaxination.ca> - 2011-05-13 21:18 -0400
Re: Uptime for OpenVMS moroney@world.std.spaamtrap.com (Michael Moroney) - 2011-05-14 02:35 +0000
Re: Uptime for OpenVMS JF Mezei <jfmezei.spamnot@vaxination.ca> - 2011-05-13 23:24 -0400
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-14 02:32 -0600
Re: Uptime for OpenVMS seasoned_geek <roland@logikalsolutions.com> - 2011-05-21 08:09 -0700
Re: Uptime for OpenVMS moroney@world.std.spaamtrap.com (Michael Moroney) - 2011-05-14 13:24 +0000
Re: Uptime for OpenVMS "Richard B. Gilbert" <rgilbert88@comcast.net> - 2011-05-14 11:04 -0400
Re: Uptime for OpenVMS "Robert A. Brooks" <rab@aitchpee.com> - 2011-05-16 11:24 -0400
Re: Uptime for OpenVMS Paul Sture <paul.nospam@sture.ch> - 2011-05-18 11:34 +0200
Re: Uptime for OpenVMS "John Reagan" <johnrreagan@earthlink.net> - 2011-05-18 07:03 -0400
Re: Uptime for OpenVMS seasoned_geek <roland@logikalsolutions.com> - 2011-05-21 07:54 -0700
Re: Uptime for OpenVMS "Robert A. Brooks" <rab@aitchpee.com> - 2011-05-23 10:00 -0400
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-14 02:30 -0600
Re: Uptime for OpenVMS glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-05-14 09:28 +0000
Re: Uptime for OpenVMS Wilm Boerhout <wboerhout-remove@this-gmail.com> - 2011-05-14 15:41 +0200
Re: Uptime for OpenVMS glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-05-14 20:55 +0000
Re: Uptime for OpenVMS Paul Sture <paul.nospam@sture.ch> - 2011-05-15 17:10 +0200
Re: Uptime for OpenVMS Single Stage to Orbit <alex.buell@munted.org.uk> - 2011-05-15 20:17 +0100
Re: Uptime for OpenVMS Paul Sture <paul.nospam@sture.ch> - 2011-05-18 11:37 +0200
Re: Uptime for OpenVMS seasoned_geek <roland@logikalsolutions.com> - 2011-05-21 08:13 -0700
Re: Uptime for OpenVMS seasoned_geek <roland@logikalsolutions.com> - 2011-05-21 08:12 -0700
Re: Uptime for OpenVMS Paul Sture <paul.nospam@sture.ch> - 2011-05-13 21:12 +0200
Re: Uptime for OpenVMS Bob Eager <rde42@spamcop.net> - 2011-05-13 19:43 +0000
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-13 14:27 -0600
Re: Uptime for OpenVMS glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-05-13 20:05 +0000
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-13 14:28 -0600
Re: Uptime for OpenVMS Bob Eager <rde42@spamcop.net> - 2011-05-13 19:41 +0000
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-13 11:16 -0600
Re: Uptime for OpenVMS koehler@eisner.nospam.encompasserve.org (Bob Koehler) - 2011-05-16 15:49 -0500
Re: Uptime for OpenVMS koehler@eisner.nospam.encompasserve.org (Bob Koehler) - 2011-05-18 09:59 -0500
Re: Uptime for OpenVMS ChrisQ <meru@devnull.com> - 2011-05-17 16:31 +0100
Re: Uptime for OpenVMS drb@ihatespam.msu.edu (Dennis Boone) - 2011-05-12 09:22 -0500
Re: Uptime for OpenVMS glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-05-11 18:09 +0000
Re: Uptime for OpenVMS Bob Eager <rde42@spamcop.net> - 2011-05-11 19:23 +0000
Re: Uptime for OpenVMS JF Mezei <jfmezei.spamnot@vaxination.ca> - 2011-05-11 12:56 -0400
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-11 11:04 -0600
Re: Uptime for OpenVMS moroney@world.std.spaamtrap.com (Michael Moroney) - 2011-05-11 17:20 +0000
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-11 11:52 -0600
Re: Uptime for OpenVMS JF Mezei <jfmezei.spamnot@vaxination.ca> - 2011-05-11 13:21 -0400
Re: Uptime for OpenVMS Ken Fairfield <ken.fairfield@gmail.com> - 2011-05-11 12:16 -0700
Re: Uptime for OpenVMS jbriggs444 <jbriggs444@gmail.com> - 2011-05-12 05:45 -0700
Re: Uptime for OpenVMS koehler@eisner.nospam.encompasserve.org (Bob Koehler) - 2011-05-12 08:17 -0500
Re: Uptime for OpenVMS onedbguru <onedbguru@yahoo.com> - 2011-05-11 17:03 -0700
Re: Uptime for OpenVMS Paul Sture <paul.nospam@sture.ch> - 2011-05-12 11:08 +0200
Re: Uptime for OpenVMS jbriggs444 <jbriggs444@gmail.com> - 2011-05-12 05:30 -0700
Re: Uptime for OpenVMS koehler@eisner.nospam.encompasserve.org (Bob Koehler) - 2011-05-12 08:39 -0500
Re: Uptime for OpenVMS Henry Crun <mike@rechtman.com> - 2011-05-12 18:41 +0300
Re: Uptime for OpenVMS seasoned_geek <roland@logikalsolutions.com> - 2011-05-13 08:49 -0700
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-13 11:19 -0600
Re: Uptime for OpenVMS billg999@cs.uofs.edu (Bill Gunshannon) - 2011-05-13 17:57 +0000
Re: Uptime for OpenVMS Johnny Billquist <bqt@softjar.se> - 2011-05-13 12:46 -0600
Re: Uptime for OpenVMS "Richard B. Gilbert" <rgilbert88@comcast.net> - 2011-05-13 15:16 -0400
Re: Uptime for OpenVMS "R.A.Omond" <Roy.Omond@BlueBubble.UK.Com> - 2011-05-11 13:58 +0100
Re: Uptime for OpenVMS MG <marcogbNO@SPAMxs4all.nl> - 2011-05-11 15:31 +0200
Re: Uptime for OpenVMS abrsvc <dansabrservices@yahoo.com> - 2011-05-11 06:37 -0700
Re: Uptime for OpenVMS Rich Jordan <jordan@ccs4vms.com> - 2011-05-11 07:42 -0700
Re: Uptime for OpenVMS Homer Shoemaker <homer.shoemaker@gmail.com> - 2011-05-12 09:07 -0700
Re: Uptime for OpenVMS Joe Bloggs <JBloggs@acme.com> - 2011-05-12 09:35 -0700
csiph-web