Sign up here and you can log into the forum!

Gen 1 - How do I force a NTP sync?

General WDLXTV forum

Gen 1 - How do I force a NTP sync?   

Postby malber4 » Sat Sep 28, 2013 4:27 pm

Hi all,

I have two questions:

1) Does anyone know how to manually force a NTP server sync with the Gen 1 using the command line?

2) Is the only way to delay the NTP sync upon boot via the persistant setting NTP_DELAY? There's no way to do this via a variable in net.mounts?


Thank you in advance :)
malber4
DLX'er
 
Posts: 62
Joined: Sat Sep 17, 2011 4:51 pm

Re: Gen 1 - How do I force a NTP sync?   

Postby RevDrew » Sun Sep 29, 2013 7:12 am

the command doesn't go in net.mounts, it goes in net.config - that could be your problem.

as for the command itself, in my net.config I am using this with no problems:
NTP=ca.pool.ntp.org

it is the last command in net.config, after the wireless network is up and running.
namaste
RevDrew™

WDTV with: 1.03.01_B-RAD.CC_WDLXTV-0.5.8.1 *wireless* DWA-140
WDTV Live: new, still in the box & unopened
2 X WDTV Live Plus with: 1.05.04_B_WDLXTV.COM_WDLXTV_PLUS-0.5.1.1: 1 wired, 1 *wireless* DWA-140

http://www.supernews.com/super-special/?i=ZxJfObJynPQ=
User avatar
RevDrew
Donor
 
Posts: 219
Joined: Mon Apr 12, 2010 5:12 pm
Location: Canada eh?

Re: Gen 1 - How do I force a NTP sync?   

Postby malber4 » Sun Sep 29, 2013 6:37 pm

Hi RevDrew,

I appreciate the response. I had meant net.config, but I typed it wrong :-S

I have the NTP server assignment setup just like you do in my net.config, however sometimes it does not sync with the NTP server due to either my internet access flaking out, or the delay variable I was mentioning which would force a delay in seconds for the sync with the NTP server (giving time for drivers to load assuming it is not flaky internet on my end). So, do you know how to do the delay variable via net.config instead of the persistant setting NTP_DELAY with config_tool?

And regarding my first question (assuming the problem is temporary flaky internet access), do you know how to force the sync with the NTP server via the command line?
malber4
DLX'er
 
Posts: 62
Joined: Sat Sep 17, 2011 4:51 pm

Re: Gen 1 - How do I force a NTP sync?   

Postby mad_ady » Sun Sep 29, 2013 11:37 pm

I haven't tested it on a gen 1, but you could try
Code: Select all
ntpdate pool.ntp.org
User avatar
mad_ady
Developer
 
Posts: 4520
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Gen 1 - How do I force a NTP sync?   

Postby malber4 » Mon Sep 30, 2013 4:10 am

Hi mad_ady,

Thanks for the response. I had tried that already and the ntpdate program isn't included with the Gen1's version of busybox :-(

There has got to be a command line version though using something else though right? Since it has to use some program at boot to query the server?
malber4
DLX'er
 
Posts: 62
Joined: Sat Sep 17, 2011 4:51 pm

Re: Gen 1 - How do I force a NTP sync?   

Postby mad_ady » Mon Sep 30, 2013 4:28 am

Hmm, then look through the startup scripts. Something like grep NTP /etc/init.d/* and see if you can figure out the command being used.
User avatar
mad_ady
Developer
 
Posts: 4520
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Gen 1 - How do I force a NTP sync?   

Postby malber4 » Tue Oct 01, 2013 7:43 am

After running a search, I found the program used for NTP sync by the Gen1 is ntpclient. The command line version to sync manually from the shell is:
Code: Select all
ntpclient -h ntpServerAddressHere -s

I verified this was successful by querying with 'date' before and after.

I am confused though because none of the init.d scripts seem to run this after searching for it, and there is nothing referencing 'ntp', 'NTP' or 'ntpclient' in the startup scripts.
malber4
DLX'er
 
Posts: 62
Joined: Sat Sep 17, 2011 4:51 pm

Re: Gen 1 - How do I force a NTP sync?   

Postby d4d » Sat Feb 22, 2014 5:25 pm

If I remember correctly I had osd/ir remote issues when using NTP=ON option on my
WDTV Gen1 FW=1.03.01.WDLXTV-0.5.8.1

S00custom-options has
config_tool -c NTP=OFF

timezone in net.config
export TZ="PST8PDT"

Created an init script
/opt/etc/init.d/S20ntp
to sync the time manually at startup

Use cron from optware and sync daily.

I installed ntpclient from optware at first (thinking it was the issue) but just checked and both work fine. I even went as far as uninstalling the ntpclient optware package, changed my scripts ntpclient paths and time is still in sync. It actually seems a little faster with the built in ntpclient but it could just be placebo.
d4d
n00b
 
Posts: 2
Joined: Sat Feb 22, 2014 9:55 am


Return to Discussion

Who is online

Users browsing this forum: No registered users and 1 guest