Re: What's the easiest way to make Busybox keep correct time?

2014-09-02 Thread K . S .
Harald Becker gmx.de> writes: > > Hi Joshua ! > > > Doesn't ntpd already use adjtimex to make that correction? > > That would be great! > > It was about 20 years ago, I used adjtimex to correct the clock of some > systems with no permanent Internet connection. Since this I did not look > t

Re: What's the easiest way to make Busybox keep correct time?

2014-09-02 Thread Harald Becker
Hi Joshua ! > Doesn't ntpd already use adjtimex to make that correction? That would be great! It was about 20 years ago, I used adjtimex to correct the clock of some systems with no permanent Internet connection. Since this I did not look to close to the changes that have gone to the time kee

Re: What's the easiest way to make Busybox keep correct time?

2014-09-02 Thread Joshua Judson Rosen
On 2014-09-01 07:00, Harald Becker wrote: Hi ! Actually, the hwclock time is what's inaccurate :-( ... bad hardware! That is very interesting but since this system is always connected to the Internet, I'm not sure I need to be that concerned about the hardware clock. If your system is alw

Re: What's the easiest way to make Busybox keep correct time?

2014-09-02 Thread Dan Fandrich
On Tue, Sep 02, 2014 at 03:12:45PM -0400, Cathey, Jim wrote: > This is/was part of a proprietary system, but I do know that it > kept track of _when_ a time correction was applied, and how much > was applied, from which it extrapolated the amount of drift the > clock would have at any point. In pr

RE: What's the easiest way to make Busybox keep correct time?

2014-09-02 Thread Cathey, Jim
>I would HOPE that flash memory has improved in the past 20 years, The underlying physics really hasn't. Some devices are more robust, but the less expensive ones aren't. They're a lot bigger, is all. You need to KNOW where and what is kept, if you want to have any confidence in the long-term r

Re: What's the easiest way to make Busybox keep correct time?

2014-09-02 Thread K . S .
Isaac Dunham gmail.com> writes: > On Tue, Sep 02, 2014 at 06:23:50PM +0200, Harald Becker wrote: > > The question is: Does Busybox ntpd activate this 11 minute mode? > > Per adjtimex, eventually it does. My experience so far is that when ntpd is run at startup it keeps the hardware clock more or

Re: What's the easiest way to make Busybox keep correct time?

2014-09-02 Thread K . S .
Harald Becker gmx.de> writes: > Let me give a couple of days, I try to get a closer look at the Busybox > adjtimex and send you a step by step description, how to use it. Thank you, Harald, I would like to see that and will be looking forward to it. _

Re: What's the easiest way to make Busybox keep correct time?

2014-09-02 Thread K . S .
Cathey, Jim ciena.com> writes: > > I don't know how all this is put together on your > particular system, but I had experience once where > an ill-advised attempt to keep the HW clock in sync > resulted in destruction of the system's EEPROM in > which the time offset and first-order drift correc

RE: What's the easiest way to make Busybox keep correct time?

2014-09-02 Thread Cathey, Jim
I don't know how all this is put together on your particular system, but I had experience once where an ill-advised attempt to keep the HW clock in sync resulted in destruction of the system's EEPROM in which the time offset and first-order drift correction factors were kept. The adjustment was de

Re: What's the easiest way to make Busybox keep correct time?

2014-09-02 Thread Isaac Dunham
On Tue, Sep 02, 2014 at 06:23:50PM +0200, Harald Becker wrote: > Hi Denys! > > On 02.09.2014 15:52, Denys Vlasenko wrote: > >$ busybox ntpd --help > >BusyBox v1.22.1 (2014-02-01 19:25:19 CET) multi-call binary. > > > >Usage: ntpd [-dnqNwl] [-S PROG] [-p PEER]... > > > >NTP client/server > > > >

Re: What's the easiest way to make Busybox keep correct time?

2014-09-02 Thread Harald Becker
Hi Denys! On 02.09.2014 15:52, Denys Vlasenko wrote: $ busybox ntpd --help BusyBox v1.22.1 (2014-02-01 19:25:19 CET) multi-call binary. Usage: ntpd [-dnqNwl] [-S PROG] [-p PEER]... NTP client/server -dVerbose -nDo not daemonize -qQuit after clock is set -NR

Re: What's the easiest way to make Busybox keep correct time?

2014-09-02 Thread Denys Vlasenko
$ busybox ntpd --help BusyBox v1.22.1 (2014-02-01 19:25:19 CET) multi-call binary. Usage: ntpd [-dnqNwl] [-S PROG] [-p PEER]... NTP client/server -dVerbose -nDo not daemonize -qQuit after clock is set -NRun at high priority -wDo not set time (only query pe

Re: What's the easiest way to make Busybox keep correct time?

2014-09-02 Thread Harald Becker
Hi ! As you already note, the kernel does this update of the hardware clock, as long as ntpd gets a synchronized clock. Beside this, an endless loop is no problem: #!/bin/sh # the actual loop as a shell function clock_update_loop() { while true do sleep 3600 hwclock -w

Re: What's the easiest way to make Busybox keep correct time?

2014-09-02 Thread Harald Becker
Hi ! > I appreciate that you would like to know why this isn't working but > I'm really not too keen on rebooting the device several times a day > when my original script seems to be working fine. This is your decision, I fully understand your concerns. Just come back, when you have need for th

Re: What's the easiest way to make Busybox keep correct time?

2014-09-01 Thread K . S .
Harald Becker gmx.de> writes: > > Try this one ... > > start() { >echo -n "Starting ntpd: " >/usr/sbin/ntpd -p north-america.pool.ntp.org && echo "OK" || echo > "failed" > } Nope, and again it did something that when I tried to ssh in, it took a long time (at least ten seconds) for th

Re: What's the easiest way to make Busybox keep correct time?

2014-09-01 Thread K . S .
I wanted to return to this post because of the discussion of crond: Isaac Dunham gmail.com> writes: > Now, if you want cron to work...: I would be interested in this only because I think it might be a good idea to run hwclock -w to update the hardware clock about once per hour. The only thing

Re: What's the easiest way to make Busybox keep correct time?

2014-09-01 Thread Harald Becker
Try this one ... start() { echo -n "Starting ntpd: " /usr/sbin/ntpd -p north-america.pool.ntp.org && echo "OK" || echo "failed" } Are you sure your ntpd (a symlink to /bin/busybox) lives in /usr/sbin ? Well, I had nothing to do with building this system so I have no idea why the formal

Re: What's the easiest way to make Busybox keep correct time?

2014-09-01 Thread Harald Becker
Hi ! > Actually, the hwclock time is what's inaccurate :-( ... bad hardware! That is very interesting but since this system is always connected to the Internet, I'm not sure I need to be that concerned about the hardware clock. If your system is always connected to a functioning Internet con

Re: What's the easiest way to make Busybox keep correct time?

2014-09-01 Thread K . S .
Harald Becker gmx.de> writes: > > Hi ! > > Only as mail, not on ML. > > May be I can help a bit ... > > >> start() { > >>echo -n "Starting ntpd: " > >>/usr/sbin/ntpd -p north-america.pool.ntp.org && \ > >>echo "OK" || { echo "failed"; exit 1 } > >> } > > I can't see why this sha

Re: What's the easiest way to make Busybox keep correct time?

2014-09-01 Thread K . S .
Harald Becker gmx.de> writes: > At second, look at your system, if it has a hardware clock (RTC = real > time clock). If your system has such a clock, verify if it keeps a > better time (Busybox command hwclock). May be you can copy over the time > from your hardware clock to the system clock

Re: What's the easiest way to make Busybox keep correct time?

2014-09-01 Thread Harald Becker
Hi ! Only as mail, not on ML. May be I can help a bit ... >> start() { echo -n "Starting ntpd: " /usr/sbin/ntpd -p north-america.pool.ntp.org && \ echo "OK" || { echo "failed"; exit 1 } } I can't see why this shall not work, except if you have put a space after that

Re: What's the easiest way to make Busybox keep correct time?

2014-09-01 Thread K . S .
Isaac Dunham gmail.com> writes: > Really, start() should be a little more like this: > > start() { > echo -n "Starting ntpd: " > /usr/sbin/ntpd -p north-america.pool.ntp.org && \ > echo "OK" || { echo "failed"; exit 1 } > } I tried the change you suggested and rebooted and wh

Re: What's the easiest way to make Busybox keep correct time?

2014-09-01 Thread Harald Becker
Hi ! > Anyway, what I really want to know is, what's the easiest way to > make this device keep accurate time? Ok, you already got a solution for your problem, which runs perfectly fine, as long as you have an Internet connection with a not to high latency. In addition, I like to put my cent

Re: What's the easiest way to make Busybox keep correct time?

2014-08-31 Thread Isaac Dunham
On Sun, Aug 31, 2014 at 10:45:09PM +, K.S. wrote: > Isaac Dunham gmail.com> writes: > > > Yes, it's because of the -q option; remove it if you want ntpd to run > > as a daemon. > > Thank you. I did that and now it shows up in the process list, so I hope > it's actually working! > > > Put a

Re: What's the easiest way to make Busybox keep correct time?

2014-08-31 Thread K . S .
Isaac Dunham gmail.com> writes: > Yes, it's because of the -q option; remove it if you want ntpd to run > as a daemon. Thank you. I did that and now it shows up in the process list, so I hope it's actually working! > Put a line starting ntpd in the appropriate init script or > add an init scri

Re: What's the easiest way to make Busybox keep correct time?

2014-08-31 Thread Isaac Dunham
On Sun, Aug 31, 2014 at 07:04:52PM +, K.S. wrote: > As I mentioned in a previous message, I am in the process of setting up a a > small backend receiver box for free-to-air satellite television that > includes Busybox. It has the ability to record programs on a schedule, and > for some unknown