Hello!
I am using s6 2.12.0.0 (with skalibs 2.14.0.0) not the last versions.
I faced issue that on mine embedded system gets proper time not at the startup (system does not have RTC), but later during runtime from GNSS/NTP (gpsd/chrony services).
In such case if I start s6-scan on startup later I can see abnormal run and ready times via s6-svstat.
Here are my patches for skalibs and s6 (actually patches from prev s6/skalibs versions, but after update patches were suitable for mentioned versions).
I am looking for some comments about are these modifications correct or not.
Also I have question what was the reason using wallclock, rather then uptime?
This is not the right place to post feedback on s6, please use one of the mailing-lists.
A monotonic clock drifts. Only the realtime clock gets readjusted. Any timestamp that needs to be read as absolute time has to come from the realtime clock. A monotonic clock can only be used for time intervals; and s6-supervise does use CLOCK_MONOTONIC as well, to compute its loop timeouts. But it's possible because the timestamps involved in the timeouts are never printed out.
I realize that it leads to incorrect time interval displays when you change your clock while s6-supervise is running. It is indeed a drawback of using a realtime clock for these timestamps. Unfortunately, the drawbacks of using a monotonic clock aren't any better: you would see incorrect timestamps for the whole duration of the service.
Thanks for you comments! I think I will continue use CLOCK_MONOTONIC, even it is not readjusted, as in my case it gives me moreless correct information about svc stat. Next time will use mailing list, noted.
Hello! I am using s6 2.12.0.0 (with skalibs 2.14.0.0) not the last versions. I faced issue that on mine embedded system gets proper time not at the startup (system does not have RTC), but later during runtime from GNSS/NTP (gpsd/chrony services). In such case if I start s6-scan on startup later I can see abnormal run and ready times via s6-svstat.
Here are my patches for skalibs and s6 (actually patches from prev s6/skalibs versions, but after update patches were suitable for mentioned versions).
I am looking for some comments about are these modifications correct or not. Also I have question what was the reason using wallclock, rather then uptime?
Thanks in advance!