maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   How to use OpenNTPD (https://talk.maemo.org/showthread.php?t=88346)

hanyunyc 2012-12-21 20:47

How to use OpenNTPD
 
After downloading and installing OpenNTPD, I wonder how to use it. I assume it does not have GUI interface. How can its path be found on the file system? Does anyone know how to run OpenNTPD and use it? Please help. Thank you.

shadowjk 2012-12-21 22:19

Re: How to use OpenNTPD
 
If I remember correctly, edit /etc/openntp.conf

On N900 I'd instead use gpsrecorder occasionally, it can sync time with gps.

hanyunyc 2012-12-22 02:21

Re: How to use OpenNTPD
 
Thank you for response. Found NTPD configuration file at location specified.

Next question, how to start and stop OpenNTPD?

Any clues appreciated. Thank you.

anthonie 2012-12-22 02:27

Re: How to use OpenNTPD
 
The wiki is pretty clear about it's workings...

http://wiki.maemo.org/NTP

[...]

Quote:

After that, save the file and reboot the device. Everything is working now in the background and you will always have correct time set. Don't worry, the daemon does not drain battery.

ladoga 2012-12-22 06:39

Re: How to use OpenNTPD
 
Quote:

...After that, save the file and reboot the device. Everything is working now in the background and you will always have correct time set. Don't worry, the daemon does not drain battery...
I've been wondering why Wiki and instructions at TMO are full of do this->reboot and do that ->reboot. I mean, why all the rebooting? Why not start/restart the service that has been installed/reconfigured and keep on using the device.

anthonie 2012-12-22 13:20

Re: How to use OpenNTPD
 
Ladoga,

I have been wondering that myself but in the past I have assumed it was under the influence of M$ software that the world has come to believe that no setting on a computer could be applied without rebooting it and that no system error could be small enough to not justify a complete reinstall of the OS. (Some data-loss may appear TM)

So, when people are unable to find themselves a wiki to get informed, I usually do not start evangelizing my zelotic beliefs of not rebooting, reinstalling and whatnot. I just point out the info in the public domain that is at hand and leave it at that.

evujumenuk 2012-12-22 17:42

Re: How to use OpenNTPD
 
I'm still holding my breath for a "real" NTP daemon that adjusts the clock's rate. openntpd isn't it.

anthonie 2012-12-22 17:52

Re: How to use OpenNTPD
 
@evujumenuk
This version we use on the N900 came over from BSD, IIRC.

I'd like to hear what's wrong with it, as this is the only one that I have ever used and it seems to work on my N900. I couldn't get it to work on a friends' N900, though.

Furthermore; What version would you prefer? I mean, we (or someone) could always have a look and see if it compiles for ARM,

evujumenuk 2012-12-22 18:06

Re: How to use OpenNTPD
 
AIUI, openntpd just regularly checks with some NTP server(s) and sets the time on the spot. It's only annoying when the clock was too slow and time is shifted forward, a sudden jump in syslog is all that happens. In the other case, time is turned back and a few seconds (or minutes) "exist twice". Many daemons' behaviour is undefined when clocks run backwards. There shouldn't be many problems, but it's still ugly.

The two main competitors are the original NTP daemon and chrony. Both are available in Debian. chrony works better with spotty network connections and has a few other advantages, most of which are summarized on a Fedora feature page:

http://fedoraproject.org/wiki/Features/ChronyDefaultNTP

As I said earlier, all three implementations compile on armel without problems.

P.S. Oh yeah, there's also the possibility of authenticating NTP using cryptographic hashes, I don't know whether chrony does this, but the traditional NTP daemon does.

Since not many carriers support NITZ (which the N9 supports), proper NTP support is a really nice thing to have on a mobile device exposed to wildly different ambient temperatures.

anthonie 2012-12-22 19:37

Re: How to use OpenNTPD
 
I don't have the build tools installed at the moment but I'll have a look.

ade 2012-12-22 20:49

Re: How to use OpenNTPD
 
For some reason I never heard of chrony before, but I see there have been debs posted for the N770 on TMO a long time ago.

It triggered me to compile the latest version (1.27-pre1), without nss (cryptography).

You can find the result here: http://dl.dropbox.com/u/42147901/chrony_1.27-pre1.zip

Content:
chronyd: the daemon itself, which will run in the background.
chronyc: the command line interface

It is just the two executables, no config or startup scripts. NTP servers etc go into the config file /etc/chrony.conf

For what I have seen in 10 minutes in the syslog it seems to do its job well. Google is your friend if you want to play with it more...

Edit: p.s. this is compiled for Maemo 5 to be clear...

evujumenuk 2012-12-22 20:59

Re: How to use OpenNTPD
 
Did you have to do anything differing from the usual build process? Ideally, this would become a .deb and source .deb on rzr's repository.

ade 2012-12-22 21:04

Re: How to use OpenNTPD
 
I only excluded nss, as I could not find the proper dev package for it.

chrony could become a proper package, if some time is spend on config files and init scripts.

evujumenuk 2012-12-22 23:40

Re: How to use OpenNTPD
 
One could just take Debian's initscripts and conffiles.

Well, maybe it's enough to just fiddle with the source .deb's Depends: and Build-Depends: lines. If not, I presume that ./configure --disable-nss did the trick?

ade 2012-12-22 23:49

Re: How to use OpenNTPD
 
Quote:

Originally Posted by evujumenuk (Post 1306947)
One could just take Debian's initscripts and conffiles.

Well, maybe it's enough to just fiddle with the source .deb's Depends: and Build-Depends: lines. If not, I presume that ./configure --disable-nss did the trick?

Yep, I used the "--disable-nss".
The initscripts would need a little modifications (upstart related I guess). You are a N9 user, right? I don't know the details of that device.


All times are GMT. The time now is 08:22.

vBulletin® Version 3.8.8