<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: $gettim high resolution time option in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548610#M17713</link>
    <description>I've logged a problem report.  &lt;BR /&gt;&lt;BR /&gt;There's apparently more here than just this, based on a little digging, too.&lt;BR /&gt;&lt;BR /&gt;And times()?   Not clock_getres() and clock_gettime()?&lt;BR /&gt;&lt;BR /&gt;If I hear back (and you've not already gotten an answer), I'll post a reply here.</description>
    <pubDate>Fri, 11 Dec 2009 19:04:25 GMT</pubDate>
    <dc:creator>Hoff</dc:creator>
    <dc:date>2009-12-11T19:04:25Z</dc:date>
    <item>
      <title>$gettim high resolution time option</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548609#M17712</link>
      <description>&lt;BR /&gt;anyone know the majic parameter to $gettim to return the hi res timestamp??&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;NEW FUNCTIONALITY AND/OR PROBLEMS ADDRESSED IN THE&lt;BR /&gt;   VMS831H1I_SYS-V0800 KIT&lt;BR /&gt;&lt;BR /&gt;     5.1  New functionality addressed in this kit&lt;BR /&gt;&lt;BR /&gt;          5.1.1  $GETTIM System Service Flag Parameter&lt;BR /&gt;&lt;BR /&gt;               5.1.1.1  Functionality Description:&lt;BR /&gt;&lt;BR /&gt;               This change adds an option flag parameter to the $GETTIM&lt;BR /&gt;               system service which will cause the service to return the&lt;BR /&gt;               number of 100ns intervals since boot with a resolution&lt;BR /&gt;               equivalent to the system time.  This change can be used&lt;BR /&gt;               in place of the C routine times() to get a higher&lt;BR /&gt;               resolution time stamp.&lt;BR /&gt;&lt;BR /&gt;               This kit is required for systems running Oracle RAC.&lt;BR /&gt;&lt;BR /&gt;               Images Affected:&lt;BR /&gt;&lt;BR /&gt;                -  [SYS$LDR]SYSTEM_PRIMITIVES.EXE&lt;BR /&gt;&lt;BR /&gt;                -  [SYS$LDR]SYSTEM_PRIMITIVES.STB&lt;BR /&gt;&lt;BR /&gt;                -  [SYS$LDR]SYSTEM_PRIMITIVES_MIN.EXE&lt;BR /&gt;&lt;BR /&gt;                -  [SYS$LDR]SYSTEM_PRIMITIVES_MIN.STB&lt;BR /&gt;&lt;BR /&gt;                -  [SYS$LDR]MESSAGE_ROUTINES.EXE&lt;BR /&gt;&lt;BR /&gt;                -  [SYS$LDR]MESSAGE_ROUTINES.STB&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;Jim&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Dec 2009 18:03:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548609#M17712</guid>
      <dc:creator>Jim Hintze</dc:creator>
      <dc:date>2009-12-11T18:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: $gettim high resolution time option</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548610#M17713</link>
      <description>I've logged a problem report.  &lt;BR /&gt;&lt;BR /&gt;There's apparently more here than just this, based on a little digging, too.&lt;BR /&gt;&lt;BR /&gt;And times()?   Not clock_getres() and clock_gettime()?&lt;BR /&gt;&lt;BR /&gt;If I hear back (and you've not already gotten an answer), I'll post a reply here.</description>
      <pubDate>Fri, 11 Dec 2009 19:04:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548610#M17713</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-12-11T19:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: $gettim high resolution time option</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548611#M17714</link>
      <description>PTR 75-123-39</description>
      <pubDate>Fri, 11 Dec 2009 19:31:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548611#M17714</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-12-11T19:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: $gettim high resolution time option</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548612#M17715</link>
      <description>&lt;BR /&gt;And here is a new entry point for 8.4 that may be the same.....&lt;BR /&gt;&lt;BR /&gt; o Functional description:&lt;BR /&gt;&lt;BR /&gt;Adding infrastructure support for new system service $GETTIM_PREC.&lt;BR /&gt;&lt;BR /&gt;The Get Time Precision service returns the current system time in&lt;BR /&gt;&lt;BR /&gt;64-bit format. The quadword is the number of 100 nanoseconds since&lt;BR /&gt;&lt;BR /&gt;November 17, 1858.The default frequency at which system time is&lt;BR /&gt;&lt;BR /&gt;updated on VMS is approximately 1 millisecond. SYS$GETTIM_PREC&lt;BR /&gt;&lt;BR /&gt;returns the system time after accounting for the time elapsed since&lt;BR /&gt;&lt;BR /&gt;the last one millisecond update of the system time on Itanium.&lt;BR /&gt;&lt;BR /&gt;On Alpha this service is equivalent to $GETTIM service and just returns&lt;BR /&gt;&lt;BR /&gt;the last updated system time. The successful completion status of the&lt;BR /&gt;&lt;BR /&gt;service on ALPHA is SS$_LOWPREC.&lt;BR /&gt;&lt;BR /&gt; So it appears this would provide 1 ms timer resolution on Alpha and something better on Itanium.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Dec 2009 21:06:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548612#M17715</guid>
      <dc:creator>Jim Hintze</dc:creator>
      <dc:date>2009-12-11T21:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: $gettim high resolution time option</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548613#M17716</link>
      <description>Hi Jim,&lt;BR /&gt;&lt;BR /&gt;If you pass the optional parameter to $GETTIM as 1, it would return the number of 100ns since "boot". Oracle RAC uses this optional parameter to get the time since boot.&lt;BR /&gt;&lt;BR /&gt;$GETTIM with optional parameter as 0 (or if it is not specified) would return the system time in 100ns. However, this system time is updated every 1 ms. Hence the precision of the system time returned is 1 millisecond.&lt;BR /&gt;&lt;BR /&gt;$GETTIM_PREC, however, returns the number of 100ns that have elapsed since November 17, 1858. In other words, this returns the system time with a much higher precision of 100ns.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Sandeep</description>
      <pubDate>Sat, 12 Dec 2009 05:45:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548613#M17716</guid>
      <dc:creator>Sandeep Ramavana</dc:creator>
      <dc:date>2009-12-12T05:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: $gettim high resolution time option</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548614#M17717</link>
      <description>The "new" $gettim call looks like this, then?&lt;BR /&gt;&lt;BR /&gt;stat = sys$gettim( pointer [,optflag] )&lt;BR /&gt;&lt;BR /&gt;Is the flag argument by value or by address?&lt;BR /&gt;&lt;BR /&gt;That's not documented in the manuals and the help; I've logged a PTR against that.&lt;BR /&gt;&lt;BR /&gt;Out of curiosity, why are there two system service calls here, and not a flag that causes $gettim to return higher precision?  (Also whether just returning higher precision values would construe a problem?  Going lower might be, but higher seems less likely to break stuff.  But the flag can control that.)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 12 Dec 2009 16:17:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548614#M17717</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-12-12T16:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: $gettim high resolution time option</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548615#M17718</link>
      <description>I wrote a FORTRAN program just to see how $gettim worked.&lt;BR /&gt;&lt;BR /&gt;It returns unexpected results.&lt;BR /&gt;&lt;BR /&gt;What is unexpected:&lt;BR /&gt;&lt;BR /&gt;1.  The return represents a delta time (time since boot) but is returned as a positive value.  So it you pass it to $asctim, it will return a date with an offset from 17-Nov-1858.  Negating it prior to passing to $ASCTIM makes it display as a delta time.&lt;BR /&gt;&lt;BR /&gt;2.  The value returned does not correspond to the uptime value that $ show system /noprocess shows.  (I think that is based on EXE$GL_ABSTIM_TICS, but I didn't check the source)&lt;BR /&gt;&lt;BR /&gt;3.  The value returned does not correspond to the f$delta(f$getsyi("BOOTTIME"),f$time())&lt;BR /&gt;&lt;BR /&gt;So it isn't clear what the source of the time returned is.  Perhaps a system cycle counter, or some interval counter on the itanium.&lt;BR /&gt;&lt;BR /&gt;Here are the results on an ES47 that has an uptime of just over two weeks.  See attachment for the FORTRAN code and command file (and I know it is poorly written code with not error checking...)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ @uptime&lt;BR /&gt;OpenVMS V8.3  on node OMEGA  14-DEC-2009 07:51:11.51  Uptime  15 07:10:31&lt;BR /&gt;The time is 14-DEC-2009 07:51:11.52&lt;BR /&gt;$GETTIM with optional parameter value 1 returns 00000C05DF7904A0&lt;BR /&gt;Converting to delta time format (negating) and formatting with $ASCTIM   15 07:12:16.36&lt;BR /&gt;  DELTA = "  15 07:12:06.53"&lt;BR /&gt;OpenVMS V8.3  on node OMEGA  14-DEC-2009 07:51:11.53  Uptime  15 07:10:31&lt;BR /&gt;&lt;BR /&gt;I am just curious why the discrepancy.  I know that EXE$GL_ABSTIM_TICS can disagree with computing the delta between current and boottime, and can be quite far out of synch if time has been changed with $ SET TIME, but I was surprised that two of the above three "uptime" values did not agree more closely with each other.&lt;BR /&gt;&lt;BR /&gt;Perhaps it something to do with the alpha accuracy bonus not being applied in the time base that this values is derived from.&lt;BR /&gt;&lt;BR /&gt;Jon&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Dec 2009 16:13:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548615#M17718</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2009-12-14T16:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: $gettim high resolution time option</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548616#M17719</link>
      <description>Jon,&lt;BR /&gt;&lt;BR /&gt;   Calculating uptime can be tricky, especially in a cluster. You're using the original boot time stamp with no compensation for clock adjustments, and the current time on the current node (which may be different from the node you're calculating for). I think this was reported a while back as a possible bug in SHOW SYSTEM (here in ITRC?). You may be seeing the results of attempting to "fix" the issue in one path than hasn't been implemented the same in another path (if only we could scrap the time mechanisms in OpenVMS and start from scratch!).&lt;BR /&gt;&lt;BR /&gt;   Note that Sandeep specified the result as "return the number of 100ns since "boot".", so a positive value would be correct, even though it's contrary to standard OpenVMS usage for delta times. From the description it sounds like this was an enhancement for a specific customer, so it would have been to their specifications.</description>
      <pubDate>Mon, 14 Dec 2009 21:43:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/gettim-high-resolution-time-option/m-p/4548616#M17719</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2009-12-14T21:43:42Z</dc:date>
    </item>
  </channel>
</rss>

