Active Topics

 


Reply
Thread Tools
debernardis's Avatar
Posts: 2,142 | Thanked: 2,054 times | Joined on Dec 2006 @ Sicily
#11
Search the forum for rdate, which works very well
 

The Following 2 Users Say Thank You to debernardis For This Useful Post:
Posts: 118 | Thanked: 59 times | Joined on May 2007
#12
Originally Posted by debernardis View Post
Search the forum for rdate, which works very well
Many, many thanks! I found rdate here: http://nitapps.com/

I'm still hoping for a working ntpd to maintain clock accuracy without my intervention, but this serves my purposes very well.


Originally Posted by Rob1n View Post
Crikey, you must have a really tight schedule
Well, yeah! Sometimes.

I work in broadcasting. When you're trying to hit a network feed that begins at precisely one minute past the top of the hour, a six-second error sounds really nasty!
 

The Following User Says Thank You to RobbH For This Useful Post:
Posts: 227 | Thanked: 53 times | Joined on Feb 2008 @ Lyon, France
#13
Originally Posted by RobbH View Post
If this works for you, that's great. I'm not seeing any change when I run this version of ntpd. In addition, this is not the way it's intended to work.

I would really like to see a working implementation of ntpd or some other form of ntp on the N900.
When running ntpd directly as suggested, this doesn't work either on my N900. I get the error message "fatal: stat: No such file or directory" in /var/log/syslog. However "/etc/init.d/openntpd start" works.
 
Posts: 83 | Thanked: 47 times | Joined on Nov 2009
#14
Originally Posted by vinc17 View Post
When running ntpd directly as suggested, this doesn't work either on my N900. I get the error message "fatal: stat: No such file or directory" in /var/log/syslog. However "/etc/init.d/openntpd start" works.
Thats great! I created a shell script:
Code:
# Start openntpd
/etc/init.d/openntpd start

# Run ntpd in foreground (not as daemon)
ntpd -d
Step by step instructions:

You need rootsh installed from Extras repository and the openntpd package from Extras-Testing to do this. Please remember to always be very careful when running stuff as root as this may damage your device if you don't know what you are doing!

1. Download the attachment ntpd.sh.txt to your N900 directory. (Which means just don't put it into any folder.) You should see this file when you open the file manager and then tap on "N900".

2. Open XTerminal and type
Code:
sudo gainroot

cd /usr/sbin/

cp /home/user/MyDocs/ntpd.sh.txt ntpd.sh

chmod 755 ntpd.sh
3. You should be all set! Everytime you'd like to synchronize the time on your N900, open up XTerminal and type:

Code:
sudo gainroot

ntpd.sh
After you see that the time is set (it usually takes around 30 seconds), you have to manually terminate the process by pressing Ctrl+C twice.

I hope this works for you all!

Have fun syncing your clocks!
Attached Files
File Type: txt ntpd.sh.txt (131 Bytes, 491 views)

Last edited by youxing; 2010-02-09 at 17:41.
 

The Following 2 Users Say Thank You to youxing For This Useful Post:
Posts: 118 | Thanked: 59 times | Joined on May 2007
#15
Originally Posted by vinc17 View Post
When running ntpd directly as suggested, this doesn't work either on my N900. I get the error message "fatal: stat: No such file or directory" in /var/log/syslog. However "/etc/init.d/openntpd start" works.
I think this post on an Ubuntu list may have something to do with the failure of openntpd to launch at startup on the N900. However, I think the "patch" offered needs some work before it will solve the problem on the N900. And so far, it's beyond me.
 
Posts: 118 | Thanked: 59 times | Joined on May 2007
#16
Thanks to vinc17 and youxing for pointing the way to an effective workaround.

First, as root, I created a file, /usr/bin/ntpdstart, containing this:

Code:
#! /bin/sh
#
rootsh /etc/init.d/openntpd start
Make it executable:
chmod +x /usr/bin/ntpdstart

Now, invoking ntpdstart from the command line will start ntpd as a daemon, updating system time regularly.

The next step I found in another thread, and I don't remember who to credit. Again, as root, I creaed this file: /etc/event.d/startopenntpd:

Code:
description "Start ntpd"
start on started clock-daemon
console none
script
              /usr/bin/ntpdstart
end script
This file should NOT be executable. After a reboot, I had ntpd starting automatically on system startup, and it has worked great since.

As always, there are no guarantees that this will work for anyone else.
 
Posts: 118 | Thanked: 59 times | Joined on May 2007
#17
Just in case anyone is still seeking a solution, there is now a compatible version of openntpd in Extras. Installs cleanly and is configured to run at startup, so the old workarounds are no longer needed.

I had to uninstall the old version; it would not update. There was also already an openntpd script in /etc/event.d, which had to be deleted manually before the installation could be completed.
 

The Following User Says Thank You to RobbH For This Useful Post:
Guest | Posts: n/a | Thanked: 0 times | Joined on
#18
Originally Posted by RobbH View Post
Just in case anyone is still seeking a solution, there is now a compatible version of openntpd in Extras. Installs cleanly and is configured to run at startup, so the old workarounds are no longer needed.
Thanks, I just installed this and it seems to be running ok after shutting the N900 down (reboot wouldn't start it), though I'm waiting for it to do it's first update. I've deliberately set the clock 5 minutes fast to see if it gets updated and nothing so far.

Is there a log file or anything that I can check to see if the changes I made to the time servers it uses are ok?

**UPDATE** don't worry, I figured out how to run it so I could see the results, stopped the daemon "openntpd stop", then ran it again as "ntpd -s -d"

Last edited by Taomyn; 2010-05-28 at 13:48.
 

The Following 2 Users Say Thank You to For This Useful Post:
Posts: 235 | Thanked: 89 times | Joined on Oct 2009 @ italy
#19
hi guys, let me know understand why at start on my n900 ps aux shows me /usr/sbin/ntpd daemon working but if I connect to internet it doesn't update automatically my date and time?
I've to launch manually ntpd command to do it!
so, what do this daemon?
__________________
If you found my post useful please thank me, I appreciate!

Last edited by maemo.it; 2010-12-23 at 17:21.
 
Posts: 26 | Thanked: 2 times | Joined on Dec 2010
#20
Why not use the Automatic time sync feature provided by the cell phone network in the clock settings? Is there a special reason to update the clock by ntp?
 

The Following User Says Thank You to delta.br For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 16:37.