|Newbie questions about Pliant
Hardware time adjustment
|Message posted by marcus on 2004/10/14 18:42:40
|Does the hardware time adjustment work for a Pliant server not running on
|Message posted by hubert.tonneau on 2004/10/14 18:56:34
|It relies on /pliant/protocol/time/client.pli
and /pliant/linux/schedule/rtc.pli which is an interface to /dev/rtc
so the issue is probably rather Unix rights than FullPliant or not.
|Message posted by marcus on 2004/10/14 19:05:36
|It seems that one needs read and write access to /dev/rtc/, right?
|Message posted by hubert.tonneau on 2004/10/14 19:55:44
|Yes, for 'rtc_set_datetime' function defined in module /pliant/linux/schedule/rtc.pli
The Linux time system is fairly complex:
. there is the harware time, but Linux reads it only once at boot
. then the time is kept up to date through incrementing a counter at each
timeslice interrupt (the interrupt hardware is programmed to generate an
interrupt something like each 1/100 or 1/1000 second and it is used by
the scheduler to provide multitasking)
So, basically, there are two dates to change: the Linux one, which is software
only, and the hardware one, which will be used on the next reboot.
|Message posted by marcus on 2004/10/14 20:06:27
|In the 'Adjust Hardware Time' web page I have used the 'Automatically adjust
There it says it should take a while to get the time automatically adjusted.
So I am keeping an eye on it, because after I had clicked on the button, the
browser says that it is waiting for my server to respond.
My question is: will the server eventually present me a message to me saying
that the time has been adjusted?
|Message posted by hubert.tonneau on 2004/10/14 20:08:55
|What is does is ajust the time smoothly, in order to not disturb running
If the machine is 5 seconds late, then it will forward 1/100 every 1 second,
so ajusting will require 500 seconds.
It is finished when the browser stops waiting for the answer.
|Message posted by marcus on 2004/10/14 20:22:09
|I have a suggestion for improving the user interface for that page: once the
user clicks on the 'Automatically adjust...' button, another page comes up.
Here is its code:
function estimateTime timeError -> timeEstimate
arg Int timeError timeEstimate
header "Automatic adjustment of time"
[It is likely that now your browser is waiting for the server to have its software ]
[ and hardware time automatically adjusted.]
[Please be patient. It should take approximately ]
text (string estimateTime:timeError)
[ seconds to adjust the time.]
[If your browser is not waiting for the time adjustment, then the time on your]
[ server has already been adjusted.]
|Message posted by marcus on 2004/10/15 11:47:33
|Something's strange with the automatic time adjustment.
Shortly after posting my last message yesterday, I requested an automatic time
adjustment of my server. I left the browser waiting for the server response.
Today early in the morning, the browser was still waiting for the response. I then opened
another browser window to verify the time deltas. To my surprise, they have
increased, from -13300 s to -13301 s, hardware clock, and from 1106 s to 1123 s,