clock time

Ronny Nilsson rln-nard at arbetsmyra.dyndns.org
Sat Oct 12 16:19:34 CEST 2019


Gilles
The set time zone script is event driven in the background and thus not 
entirely easy to trace. One method however is using the logger command you've 
already discovered. The output from logger shows up in the system log 
(syslog). In embedded systems logs are often only a circular memory buffer 
though (due to we have no harddrive). You can read that buffer with 
the "logread" command. Whatever you write with the logger command can be read 
with logread. So, insert lots of "logger" in the script you want to trace. :)  

As you probably has found already the time zone script first ask 
http://ip-api.com where you are. And with the help of that answer downloads 
some files from my site http://www.nard.se. Also note that this auto-zone 
feature is easy to disable if you don't like it by adding "no-timezone" to 
the kernel command line.

BusyBox really is a life saver. The version used is 1.22.1 however. But that 
is old too! An upgrade would be nice! Anyone volunteering to help me with it? 
There are many other packages that would benefit from an upgrade as well... I 
think most acute is actually the kernel, if Nard is ever going to run on the 
Pi 4.

/Ronny


---------------------------------------------
> Ronny
>
> I found the timezone script which implements what your were explaining.
>
> I would like to trace its execution; how do I do that?
>
> The logger command is often used in your scripts. Where is its output?
> Is there a switch to activate it?
>
> I also note that many basic commands come from busybox. The version in
> nard is 1.21.6 of 20 January 2014. The current stable one is 1.30.1 of
> 14 February 2019. There has been many hundred patches in the meantime.
> An upgrade would not hurt me!
>
> ~ Gilles
>
> Le 2019-10-08 à 05:37, Ronny Nilsson a écrit :
> > Hi
> > This i likely due to the automatic time zone feature in Nard. At bootup
> > the system tries to guess where you are in the world by looking at your
> > public Internet address. If it find something it downloads data
> > corresponding to that time zone and switches into it. The reason for
> > downloading the time zone instead of embedding it in the SD card image is
> > due to storage size and boot speed. All of the world zone data is quite
> > large.
> >
> > /Ronny
> >
> >
> > ------------------------------------------
> >
> >>   On power up or reboot of my RPI, the date command in bash sometimes
> >> displays local time and sometimes UTC time.
> >>
> >>   My ntp config has:
> >>        ntpserver="time.nrc.ca"
> >> which has the official Canadian time.
> >>   I cannot pinpoint why? Any idea/suggestion?
> >>
> >> ~ Gilles



More information about the Nard mailing list