Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 19 Oct 2018, 09:52
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » System
Psync Time Synchroniser Version 2.9 & 2.7-64bit
Post new topic   Reply to topic View previous topic :: View next topic
Page 9 of 9 [126 Posts]   Goto page: Previous 1, 2, 3, ..., 7, 8, 9
Author Message
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8702
Location: Perth, Western Australia

PostPosted: Mon 09 Apr 2018, 20:50    Post subject:  

Sylvander wrote:
For a long time now...
Been having a problem...
Display of time is nearly always 1 hour behind despite psync-2.10 being set to auto-sync.
I can use psync to correct the time, but at next boot, the time is again 1 hour behind.
Once in a while [1 in 50?], at the beginning of a new session, psync will auto-sync correctly, and the time is correct.
This is within Slacko-5.7.0-pae.


As I understand it, psync waits for Internet, but will timeout. So, if your Internet is not up soon enough, psync won't work.

It is awhile since I looked at it, but I think that is still how psync works.

Back in 2016 I developed Qsync, which waits indefinitely for the Internet to come up. This is for my fork of Puppy, Quirky Linux, and more recently EasyOS.

Porting Qsync to Puppy is possible, but some of the infrastructure is different, and it would involve some work.

It might be simpler just to look at the timeout in psync and set it to wait a bit longer.

For the curious, this was my original post about Qsync:

http://bkhome.org/news/201611/qsync-ntp-time-sync.html

though recently it has changed:
http://bkhome.org/news/201803/qsync-new-handled-by-pupevent-service-manager.html

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Sylvander

Joined: 15 Dec 2008
Posts: 4390
Location: West Lothian, Scotland, UK

PostPosted: Mon 09 Apr 2018, 21:21    Post subject:  

1.
BarryK wrote:
As I understand it, psync waits for Internet, but will timeout. So, if your Internet is not up soon enough, psync won't work.

Yes, once I saw that the time was wrong, and as I had only began to sync but nowhere near completed, the time magically corrected.
I concluded that auto-sync had somehow managed to auto-connect to the servers.
Thing is...
I normally power on my HUB, and wait for a long time before booting, and the internet connection is typically good once at the desktop.
Desktop PC connected to the hub by wire, very reliable.
Perhaps the above was only time I booted too soon.

2.
BarryK wrote:
It might be simpler just to look at the timeout in psync and set it to wait a bit longer.

How?
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8702
Location: Perth, Western Australia

PostPosted: Thu 12 Apr 2018, 05:48    Post subject:  

Sylvander wrote:
2.
BarryK wrote:
It might be simpler just to look at the timeout in psync and set it to wait a bit longer.

How?


Psync has /root/Startup/timesync.sh, which has "sleep 15" in it.

But I haven't looked at this for awhile, not sure if that is still the situation in latest Psync.

EDIT:
I just now downloaded psync 2.10 PET. It looks like there is a wait loop for wifi to be "up", however no wait loop for ethernet.

So, as far as I can see, if you are connected to internet via ethernet, it must be up immediately. timesync.sh calls psyncfunc immediately, which calls ntpdate to read the time from an ntp server.

So, you could install a sleep before the call to psyncfunc, or, always ensure that your ethernet is connected to internet when you power-on the pc.

Or, it is possible to write a simple wait-loop to test for active internet before calling psyncfunc.

I remember now, I was using the RPI years ago, with Psync, and ethernet, hit this problem.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Sylvander

Joined: 15 Dec 2008
Posts: 4390
Location: West Lothian, Scotland, UK

PostPosted: Thu 12 Apr 2018, 14:06    Post subject:  

1.
BarryK wrote:
Psync has /root/Startup/timesync.sh, which has "sleep 15" in it.

It does indeed have this included.

2.
BarryK wrote:
...you could install a sleep before the call to psyncfunc...

Wouldn't know where to place that or how to word/code it.
Would need detailed instructions.

3.
BarryK wrote:
or, always ensure that your ethernet is connected to internet when you power-on the pc.

I always do.

4.
BarryK wrote:
it is possible to write a simple wait-loop to test for active internet before calling psyncfunc

Seems simple to you I bet, but it's like rocket science to me.

5.
BarryK wrote:
I remember now, I was using the RPI years ago, with Psync, and ethernet, hit this problem.

Was any solution found, to the problem, at that time?
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8702
Location: Perth, Western Australia

PostPosted: Thu 12 Apr 2018, 19:16    Post subject:  

Sylvander wrote:
1.
BarryK wrote:
Psync has /root/Startup/timesync.sh, which has "sleep 15" in it.

It does indeed have this included.

2.
BarryK wrote:
...you could install a sleep before the call to psyncfunc...

Wouldn't know where to place that or how to word/code it.
Would need detailed instructions.

3.
BarryK wrote:
or, always ensure that your ethernet is connected to internet when you power-on the pc.

I always do.

4.
BarryK wrote:
it is possible to write a simple wait-loop to test for active internet before calling psyncfunc

Seems simple to you I bet, but it's like rocket science to me.

5.
BarryK wrote:
I remember now, I was using the RPI years ago, with Psync, and ethernet, hit this problem.

Was any solution found, to the problem, at that time?


Well, everything should be ok if you have the router powered up well before turning on the computer.

Just keep that habit, and no need to fix anything.

If you do want psync to wait a bit, in /root/Startup/timesync.sh, insert a line "sleep 15", or however long you want to sleep, just before the line "psyncfunc"
-- that will delay the time-sync a bit.

Regarding point-5, I had the situation where internet was not always up when bootup, so Psync failed. My solution was to develop Qsync.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Sylvander

Joined: 15 Dec 2008
Posts: 4390
Location: West Lothian, Scotland, UK

PostPosted: Fri 13 Apr 2018, 07:43    Post subject:  

1.
BarryK wrote:
Well, everything should be ok if you have the router powered up well before turning on the computer.

"Everything should be ok" perhaps, but unfortunately it isn't ok, since it fails to auto-sync, even after the "Virgin Hub"->[router+modem in one unit] has been powered-on for a LOOOOONG time.

2.
BarryK wrote:
If you do want psync to wait a bit, in /root/Startup/timesync.sh, insert a line "sleep 15", or however long you want to sleep, just before the line "psyncfunc"
-- that will delay the time-sync a bit.

"sleep 15" is already included...
I'll increase it to "sleep 20", and if that fails to fix, increase it to "sleep 25".
-----------------------------------------------------------------------------------------------------------
Tried that...failed...increased to 30 sec...still failed. Sad
[I saved the change to the file, then saved the change to the pupsave, then rebooted and again saved the change to the pupsave during shutdown->reboot.]
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 9 of 9 [126 Posts]   Goto page: Previous 1, 2, 3, ..., 7, 8, 9
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » System
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0803s ][ Queries: 15 (0.0346s) ][ GZIP on ]