EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: ClockTimeReport OS Clock Sync Not Running?
From: "Johnson, Andrew N. via Tech-talk" <tech-talk at aps.anl.gov>
To: "Manoussakis, Adamandios" <manoussakis1 at llnl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Mon, 4 Jan 2021 21:32:23 +0000
Hi Adam,

On Jan 4, 2021, at 2:42 PM, Manoussakis, Adamandios via Tech-talk <tech-talk at aps.anl.gov> wrote:

Trying to understand how the timestamp is being placed in a record by looking at the ClockTimeReport and the generalTimeReport.  I also have been exploring using our NTP server with the IOC by setting the env variable EPICS_TS_NTP_INET to the NTP IP.  I may be understanding the reports incorrectly but wanted to make sure that without the NTP server at least the IOCs are syncing with the OS (my iocs are running from within a VM).  I do have the VM setup to sync with the OS.

What OS is your VM running? The time synchronization functionality in the IOC is *only* used on embed systems where the OS is VxWorks or RTEMS; if you’re running this IOC on Linux, Windows, MacOS or any other workstation OS the IOC code relies on the OS to keep its clock synchronized with whatever time sources you have available locally.


How I understand it if no NTP server is around the IOC will grab its timestamp based off the IOC Boot server (OS Clock?).  But the ClockTimeReport is showing
 
epics> ClockTime_Report             
Program started at 2021-01-04 12:22:24.937270
OS Clock synchronization thread not running.

I get the same result if I run that on a Linux-based softIoc. This is exactly what I expect to happen because the IOC will never try to do clock synchronization on Linux, you should be running a specialized daemon such as ntpd or Chrony to do that (we have found that using Chrony gives much lower clock jitter if the OS is actually running as a VM, although newer versions of ntpd might have improved since we actually compared the two).

We originally added the clock synchronization functionality to the IOC because VxWorks didn’t have the ability to do that itself at the time. The features in GeneralTime were designed to support several different methods of time synchronization that EPICS labs were using at the time on the various embedded OSs.

But the generalTimeReport seems to match my OS clock
 
epics> generalTimeReport
Backwards time errors prevented 0 times.
 
Current Time Providers:
    "OS Clock", priority = 999
                Current Time is 2021-01-04 12:24:51.784595.
 
Event Time Providers:
                No Providers registered.

Again that is the expected result on Linux.

- Andrew


-- 
Complexity comes for free, simplicity you have to work for.


Replies:
RE: ClockTimeReport OS Clock Sync Not Running? Manoussakis, Adamandios via Tech-talk
References:
ClockTimeReport OS Clock Sync Not Running? Manoussakis, Adamandios via Tech-talk

Navigate by Date:
Prev: ClockTimeReport OS Clock Sync Not Running? Manoussakis, Adamandios via Tech-talk
Next: RETIGA? John Dobbins via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: ClockTimeReport OS Clock Sync Not Running? Manoussakis, Adamandios via Tech-talk
Next: RE: ClockTimeReport OS Clock Sync Not Running? Manoussakis, Adamandios via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
ANJ, 04 Jan 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·