Tiny Core Base > TCB Tips & Tricks

[trick] get the time for your clock

<< < (3/6) > >>

jazzbiker:
Hi, ferran!

What is /etc/conf? ntpd is looking for /etc/ntp.conf
You can read about boot codes in wiki or in FAQ.
I don't understand what's going on, and I can not do any testing, so let's take the things as they are. You have the working ntp servers, so anybody can repeat Your steps, if necessary.

ferran:

--- Quote from: jazzbiker on March 23, 2020, 03:55:24 PM ---Hi, ferran!

What is /etc/conf? ntpd is looking for /etc/ntp.conf
You can read about boot codes in wiki or in FAQ.
I don't understand what's going on, and I can not do any testing, so let's take the things as they are. You have the working ntp servers, so anybody can repeat Your steps, if necessary.

--- End quote ---

yes. I would say /etc/ntp.conf It was just a writing mistake.

Ok. It's a good moment that the people talks :)

jazzbiker:
Hi, ferran!

Some observations about ntpd.
Exit code with -q switch says nothing about sucess or fail:

--- Code: ---tc@box:~$ sudo ntpd  -q -p rubbish.box
tc@box:~$ echo $?
0

--- End code ---

Some peer acessibility testing may be done with the help of -w switch:


--- Code: ---tc@box:~$ sudo ntpd -w -p pool.ntp.org
ntpd: reply from 91.236.251.29: offset:+0.012651 delay:0.031612 status:0x24 strat:2 refid:0x15119582 rootdelay:0.026810 reach:0x01
ntpd: reply from 91.236.251.29: offset:+0.020740 delay:0.017485 status:0x24 strat:2 refid:0x15119582 rootdelay:0.026810 reach:0x03
^C

--- End code ---


--- Code: ---tc@box:~$ sudo ntpd -w -p 0.es.pool.ntp.org
ntpd: reply from 81.19.96.148: offset:+0.029865 delay:0.085033 status:0x24 strat:2 refid:0x4dcccb8c rootdelay:0.035935 reach:0x01
ntpd: reply from 81.19.96.148: offset:+0.030063 delay:0.087207 status:0x24 strat:2 refid:0x4dcccb8c rootdelay:0.035935 reach:0x03
^C

--- End code ---


--- Code: ---tc@box:~$ sudo ntpd  -w -p rubbish.box
ntpd: bad address 'rubbish.box'
ntpd: bad address 'rubbish.box'
^C

--- End code ---

Multiple servers can be used:

--- Code: ---tc@box:~$ sudo ntpd  -w -p rubbish.box -p pool.ntp.org
ntpd: bad address 'rubbish.box'
ntpd: reply from 79.142.192.130: offset:+0.019904 delay:0.002564 status:0x24 strat:3 refid:0x963937f8 rootdelay:0.009308 reach:0x01
ntpd: bad address 'rubbish.box'
ntpd: reply from 79.142.192.130: offset:+0.019750 delay:0.002560 status:0x24 strat:3 refid:0x963937f8 rootdelay:0.009308 reach:0x03
ntpd: reply from 79.142.192.130: offset:+0.019888 delay:0.002740 status:0x24 strat:3 refid:0x963937f8 rootdelay:0.009308 reach:0x07
^C

--- End code ---

If You will be in the mood for experimenting, it will be interesting to see the results.

ferran:
Yes. the last discovery i did was to aply the /etc/ntp.conf into the ntpd -w -q


--- Code: ---sudo ntpd -w -q /etc/ntp.conf

--- End code ---

It works successfully ! but the /etc/ntp.conf dissapear with each reboot or shutdown  :'(

Rich:
Hi ferran
You need to add:

--- Code: ---etc/ntp.conf
--- End code ---
to your  /opt/.filetool.lst  file and then run a backup. Note there is no leading slash in the path.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version