Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Since the stratum level (st) is 16 ntp will not use those servers. If you stop and restart ntp you will get a new set of servers. If the results are the same try switching the pool.
Still the same. I changed the pool, restarted the ntp. Nothing happened. Time is still the same and st is still 16 while the remote ip addresses are changed.
What should I change the localtime to in sudo cp /usr/share/zoneinfo/US/Pacific /etc/localtime?
Universal, UTC or to my timezone Asia or something else?
I changed the pool to:
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 3.pool.ntp.org
Syncing depends on the network being up. And access to the internet. I tend to not run ntp(d) and opt to sync one time manually at boot.
# ntpdate <server>
In my case time-b.nist.gov is what I use most often, but regionally appropriate. In the absence of a network, I go even more manual.
# date -s "YYYYMMDD"
# date -s "HH:MM:SS"
There's probably better ways. But sometimes at a fresh installation, the old manual ways get you through the day.
Some ntp servers don't let you sync if you're more than a day or two off. And since the RPi starts at epoch 0 (1970), you're literally years off. So the manual date method helps to overcome that hurdle by putting you back into tolerances.
How do I set ntpdate <server>? Just by running this command?
The set time using:
# date -s "YYYYMMDD"
# date -s "HH:MM:SS"
is not permanent. The raspberry pi just carried on from the time it had got to before I'd turned it off.
Unless you added a battery backed real time clock the clock should start at 0000 1 Jan 1970 at power up. It can't just carry on.
The pi does not have the ntpdate command which is obsolete anyway but can be installed. Although it does help with diagnosing problems. You can use ntpd -g -q but you still need to use a valid time server.
Could be a network issue. Do other computers run linux and sync using ntp? Try the following.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.