Closed eswenson1 closed 9 months ago
This can be fixed two ways: 1. by getting time from the network, which is issue #2213, and/or 2. yes, some "time base" stuff in the pdp10-ks emulator. I don't know the details, but KLH10 does it right.
I'm closing this, since there is an issue for 1, and 2 is an emulator issue.
Ok, but #1 still doesn't work for me. And pdp10-ks should be able to provide the host time to ITS.
It's expected not to work yet because #2213 hasn't been fixed.
There is no formula to convert local time to the value stored in TIM register. ITS reads it and uses the value to compute the offset to the current time.
Well, I updated the server lists in my local NETIME and TIMES, and TIMES reports this now:
times↑K!
Checking the time using CHAOS protocol: (^S to stop):
Subnet Site Greenwich Mean Time Local Time
13 EX-ITS.SWENSON.09/21/23 19:18:39 -> 09/21/23 15:18:39 EDT.
13 ES-ITS.SWENSON.09/21/23 19:19:25 -> 09/21/23 15:19:25 EDT.
13 KA 09/21/23 19:18:37 -> 09/21/23 15:18:37 EDT.
13 KL 09/21/23 19:18:27 -> 09/21/23 15:18:27 EDT.
13 DB-ITS.EXAMPLE.COM's time is unavailable.
Realtime used: 5.76 secs.
Note, however, that TIMES is reporting the times in EDT, even though the local TZONE is set to PT. So that is another bug in TIMES -- it needs to correctly convert to the local time zone rather than EDT.
And NETIME has the same issue. It gets the times, decides to set the local time, but sets it by converting the time received to EDT as the local time -- even if TZONE is set to something else.
So in my case, when I boot my KS instance, it says this;
$G
Salvager 261
.TEMP. has no files, User File Directory DELETED
IT IS NOW 3:03:30 PM PDT, THURSDAY, SEP 21, 2023
Note that it did use NETIME to get the time, but messed up the time zone calculation (it is 3 hours off because it converted the GMT times it received to EDT (hardcoded), and then set the chosen time as local).
There is no formula to convert local time to the value stored in TIM register. ITS reads it and uses the value to compute the offset to the current time.
How does KLH10 do this properly then?
It saves the value of the current time and the TIM value. Then computes the adjustment based on how much time has passed.
So why can't pdp10-ks? So I assume for the first boot of ITS under KLH10 (without a saved time base), the clock will not be set, and once it is set (via PDSET), then klh10 saves the current TIM and clock time in a file, and in subsequent boots of ITS klh10 will be able to provide the current TIM value?
Where do you store the file? Does the file need to be compatible with klh10? since the time can be set with the network, I see this as a low priority fix.
You store the file in the current directory (like where you store tapes that are attached). There is no reason to make it compatible with klh10's APR.TIMEBASE file. It should be private to pdp10-ks.
The time cannot always be set by the network. First, the system may not be on the network or disconnected from it. Second, ITS needs a quorum of TIME servers before setting the time -- it may not be able to get one. Third, there needs to be good agreement between the TIME servers -- that may not be possible.
If i use the pdp10-ks emulator to boot a KS instance, the clock isn't known. Each boot, I have to run PDSET. Here are the messages emitted by ITS on boot:
I note the message about "No host responded" regarding getting the time automatically set. What do I have to do to get this working?
Also, has there been any progress on pdp10-ks so that it can return the time to ITS properly? And, if necessary, do like KLH10 does, and save a file with the time base, so that it can get the correct time?