How do Raspberry Pis know what the time is?
On my Pis NTP isn't installed but they seem to know what the time is
OK so how do they do it?
How do Raspberry Pis know what the time is?
On my Pis NTP isn't installed but they seem to know what the time is
OK so how do they do it?
On 2/10/22 15:07, Chris Green wrote:
How do Raspberry Pis know what the time is?
On my Pis NTP isn't installed but they seem to know what the time is
OK so how do they do it?
systemd.timesync.d
How do Raspberry Pis know what the time is?
On my Pis NTP isn't installed but they seem to know what the time is
OK so how do they do it?
How do Raspberry Pis know what the time is?
On my Pis NTP isn't installed but they seem to know what the time is
OK so how do they do it?
On 2/10/22 15:07, Chris Green wrote:
How do Raspberry Pis know what the time is?
On my Pis NTP isn't installed but they seem to know what the time is
OK so how do they do it?
systemd.timesync.d
How do Raspberry Pis know what the time is?
On my Pis NTP isn't installed but they seem to know what the time is
OK so how do they do it?
Hello Chris!
Thursday February 10 2022 21:07, you wrote to All:
How do Raspberry Pis know what the time is?
On my Pis NTP isn't installed but they seem to know what the time is
OK so how do they do it?
Are you SURE that it is not installed ?
Vincent Coen <nospam.Vincent.Coen@f1.n250.z2.fidonet.org> wrote:
Well I can't see anything that looks like it:-
chris@backup$ ps -ef | grep -i ntp
chris 7885 7820 0 22:36 pts/0 00:00:00 grep --color=auto -i ntp
chris@backup$ man -k ntp
grantpt (3) - grant access to the slave pseudoterminal
intptr_t (3) - overview of system data types
mountpoint (1) - see if a directory or file is a mountpoint
ntp_adjtime (3) - tune kernel clock
ntp_gettime (3) - get time parameters (NTP daemon interface)
ntp_gettimex (3) - get time parameters (NTP daemon interface)
uintptr_t (3) - overview of system data types
Ah, thank you. Why did they have to change the name from the almost >universal ntp I wonder.
Re: How does Pi get its time?
By: Chris Green to All on Thu Feb 10 2022 09:07 pm
How do Raspberry Pis know what the time is?
On my Pis NTP isn't installed but they seem to know what the time is
OK so how do they do it?
If you are running Raspbian, it could well be timesyncd.
The Pi seems to have a crude
real-time clock which gets the time approximately right (maybe wrong by
a couple of hours), rather than reverting to "the beginning of time" (1
Jan 1970).
systemctl status systemd-timesyncd
might need a sudo in front.
On Thu, 10 Feb 2022 22:38:16 +0000, Chris Green <cl@isbd.net>
declaimed the
following:
Ah, thank you. Why did they have to change the name from the almost
universal ntp I wonder.
For the same reason the fairly easily understood Sys-V init
processing is being replaced by the mysterious complicated systemd
scheme... "It's new! Therefore it must be better!"
No it is not new I have been using distro Mageia for many years which uses it.
How do Raspberry Pis know what the time is?
On my Pis NTP isn't installed but they seem to know what the time is
OK so how do they do it?
How do Raspberry Pis know what the time is?
On my Pis NTP isn't installed but they seem to know what the time is
OK so how do they do it?
"Knute Johnson" <knute2020@585ranch.com> wrote in message news:su409i$st3$1@dont-email.me...
On 2/10/22 15:07, Chris Green wrote:
How do Raspberry Pis know what the time is?
On my Pis NTP isn't installed but they seem to know what the time is
OK so how do they do it?
systemd.timesync.d
Beware of running time-sensitive software on a Pi that reboots and doesn't immediately have an internet connection.
I use a Pi to run Cumulus weather station software. This logs and graphs
data from a weather station. If there has been a power cut, everything *starts* to boot at the same time when the power comes back. If the Pi boots first, and the router takes its time connecting, the Pi will run with a
silly time until it is able to synchronise with an internet time source.
This leads to graphs which suddenly shoot back by several hours (when the Pi reboots) and then shoot forward again (once the Pi has managed to synchronise). My impression is that the Pi checks frequently for a time source to begin with, which is why I rarely see the problem, but then starts polling less frequently, which is why on the rare occasions that I've seen the problem, the update to the correct time happens a fair time after the router has connected and I've been able to browse the web on other
computers. The Pi seems to have a crude real-time clock which gets the time approximately right (maybe wrong by a couple of hours), rather than
reverting to "the beginning of time" (1 Jan 1970).
It's not the end of the world, and not worth the hassle of implementing a proper battery-backed RTC (as on a Windows/Linux PC). The software logs readings every 10 minutes (though it graphs them every minute) so there aren't usually many readings that have an incorrect timestamp, and it's obvious which times are missing because they *should* be at 00, 10, 20, 30, 40, 50 minutes past every hour. It's just a case of hand-editing the log
file and then restarting the software manually so it regenerates the graphs with the correct time axis.
I imagine that a Pi that is run without an internet connection (eg an unattended device with no Ethernet/wifi connection) will free-run - unless
it has a GPS connection (eg to record a track of where it is going) in which case it can be configured to use the time from the GPS to sync the system clock. I imagine there are RTC modules that communicate through the GPIO socket, for devices that have no internet connection.
On my Raspberry Pi cards I always install NTP. As you say, sadly this
isn't the default on recent OS versions, so an extra step is required.
On 11-02-2022 09:47, David Taylor wrote:
On my Raspberry Pi cards I always install NTP. As you say, sadly this
isn't the default on recent OS versions, so an extra step is required.
And presumably you also uninstall the alternative systemd-timesyncd? I
*hate* the complexity of systemd vs the old sysvinit, but time sync is
one service that just works in the background, so I don't bother with it
& am not bothered by it. What are the specific advantages of ntp for you?
On 11-02-2022 09:47, David Taylor wrote:
On my Raspberry Pi cards I always install NTP. As you say, sadly this
isn't the default on recent OS versions, so an extra step is required.
And presumably you also uninstall the alternative systemd-timesyncd? I
*hate* the complexity of systemd vs the old sysvinit, but time sync is
one service that just works in the background, so I don't bother with it
& am not bothered by it. What are the specific advantages of ntp for you?
On Thu, 10 Feb 2022 22:38:16 +0000, Chris Green <cl@isbd.net> declaimed
the following:
Ah, thank you. Why did they have to change the name from the almost >universal ntp I wonder.
For the same reason the fairly easily understood Sys-V init
processing is being replaced by the mysterious complicated systemd
scheme... "It's new! Therefore it must be better!"
The advantages [of ntp] are many, but
briefly:
- able to accept a PPS time source (e.g. GPS)
- accepts multiple servers including "pool"
- acts as a time server for other clients
- simple setup
- easy to monitor (locally and remotely)
- having the same configuration and monitoring on Linux and Windows
Beware of running time-sensitive software on a Pi that reboots and doesn't immediately have an internet connection.
Tristan Greaves <nospam.Tristan.Greaves@f1.n770.z30.fidonet.org> wrote:
Re: How does Pi get its time?Ah, thank you. Why did they have to change the name from the almost universal ntp I wonder.
By: Chris Green to All on Thu Feb 10 2022 09:07 pm
CG> How do Raspberry Pis know what the time is?
CG> On my Pis NTP isn't installed but they seem to know what the time is >> CG> OK so how do they do it?
If you are running Raspbian, it could well be timesyncd.
On Thu, 10 Feb 2022 18:11:47 -0500
Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:
On Thu, 10 Feb 2022 22:38:16 +0000, Chris Green <cl@isbd.net>
declaimed the following:
Ah, thank you. Why did they have to change the name from the almost
universal ntp I wonder.
For the same reason the fairly easily understood Sys-V init
processing is being replaced by the mysterious complicated systemd
scheme... "It's new! Therefore it must be better!"
Sys V init is far from elegant (name ordered scripts ugh!) and
somewhat overengineered (run levels and all those links ugh!) so I can understand the desire to replace it - but there was BSD init easily
available which is like Sys V init without the ugh! Then again I am
sure there are some who miss having everything in /etc/rc.
I have a slightly different theory to "It's new! Therefore it
must be better!" - I think it's more about separating Linux the OS
family from Unix the OS family - remember Gnu's NOT Unix.
I have a slightly different theory to "It's new! Therefore it
must be better!" - I think it's more about separating Linux the OS
family from Unix the OS family - remember Gnu's NOT Unix.
That reminds me of a sales pep rally that I wasn't allowed to duck
out of. The bigwigs were going on about "product differentiation" -
which I interpreted as: "Make it different, even it it means
screwing it up."
On 2022-02-11, Ahem A Rivet's Shot <steveo@eircom.net> wrote:
On Thu, 10 Feb 2022 18:11:47 -0500
Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:
On Thu, 10 Feb 2022 22:38:16 +0000, Chris Green <cl@isbd.net>
declaimed the following:
Ah, thank you. Why did they have to change the name from the almost
universal ntp I wonder.
For the same reason the fairly easily understood Sys-V init
processing is being replaced by the mysterious complicated systemd
scheme... "It's new! Therefore it must be better!"
Sys V init is far from elegant (name ordered scripts ugh!) and
somewhat overengineered (run levels and all those links ugh!) so I can
understand the desire to replace it - but there was BSD init easily
available which is like Sys V init without the ugh! Then again I am
sure there are some who miss having everything in /etc/rc.
I have a slightly different theory to "It's new! Therefore it
must be better!" - I think it's more about separating Linux the OS
family from Unix the OS family - remember Gnu's NOT Unix.
That reminds me of a sales pep rally that I wasn't allowed to duck
out of. The bigwigs were going on about "product differentiation" -
which I interpreted as: "Make it different, even it it means
screwing it up."
No.I have a slightly different theory to "It's new! Therefore it
must be better!" - I think it's more about separating Linux the OS
family from Unix the OS family - remember Gnu's NOT Unix.
That reminds me of a sales pep rally that I wasn't allowed to duck
out of. The bigwigs were going on about "product differentiation" -
which I interpreted as: "Make it different, even it it means
screwing it up."
Isn't the reason that Micro$oft OSes use '\' for file/folder separator
is that unix used '/' and MS had to be different?
Isn't the reason that Micro$oft OSes use '\' for file/folder separator
is that unix used '/' and MS had to be different?
No.
CP/M which DOS was based on used a backslash, and IIRC that was derived
from a floppy disk system that was part of an intel 8080 development
platform
Isn't the reason that Micro$oft OSes use '\' for file/folder separatorI have a slightly different theory to "It's new! Therefore it must be
better!" - I think it's more about separating Linux the OS family from
Unix the OS family - remember Gnu's NOT Unix.
That reminds me of a sales pep rally that I wasn't allowed to duck out
of. The bigwigs were going on about "product differentiation" -
which I interpreted as: "Make it different, even it it means screwing
it up."
is that unix used '/' and MS had to be different?
On Sat, 12 Feb 2022 20:16:05 +0000, Jim Jackson wrote:v2-0
Isn't the reason that Micro$oft OSes use '\' for file/folder separatorI have a slightly different theory to "It's new! Therefore it must be
better!" - I think it's more about separating Linux the OS family
from Unix the OS family - remember Gnu's NOT Unix.
That reminds me of a sales pep rally that I wasn't allowed to duck out
of. The bigwigs were going on about "product differentiation" - which
I interpreted as: "Make it different, even it it means screwing it
up."
is that unix used '/' and MS had to be different?
The official reason seems to have been lost in time, but we can infer it
from some history
1) MSDOS/PCDOS v1 followed CP/M in supporting only one directory per
device, so there was no "file/folder" separator allocated for MSDOS
or PCDOS when originally developed.
2) However, MSDOS/PCDOS established (in COMMAND.ASM) the use of a
forward
slash ('/') as a command flag sentinel.
So, when Microsoft wrote MSDOS v2, which supported a directory
structure, they obviously could not use the forward-slash as a directory component separator, as it was already firmly established (in code, no
less) as the sentinel for command flags. They had to pick a different separator for directory components, and they settled on the backslash
(in the command processor), and /either/ the backslash /or/ the
forwardslash in the API.
Microsoft operating systems, to this day, will accept either backslash
or forwardslash in paths passed to the file functions API.
PS: The source code for PCDOS/MSDOS v1.1 /and/ MSDOS 2.0 is available
from The Computer History Museum at https://computerhistory.org/blogs/microsoft-research-license-agreement- msdos-v1-1-v2-0/?key=microsoft-research-license-agreement-msdos-v1-1-
Tristan Greaves <nospam.Tristan.Greaves@f1.n770.z30.fidonet.org> wrote:
Re: How does Pi get its time?Ah, thank you. Why did they have to change the name from the almost universal ntp I wonder.
By: Chris Green to All on Thu Feb 10 2022 09:07 pm
CG> How do Raspberry Pis know what the time is?
CG> On my Pis NTP isn't installed but they seem to know what the time is >> CG> OK so how do they do it?
If you are running Raspbian, it could well be timesyncd.
Sys V init is far from elegant (name ordered scripts ugh!) and
somewhat overengineered (run levels and all those links ugh!) so I can understand the desire to replace it - but there was BSD init easily
available which is like Sys V init without the ugh! Then again I am
sure there are some who miss having everything in /etc/rc.
Ahem A Rivet's Shot wrote:
Sys V init is far from elegant (name ordered scripts ugh!) and
somewhat overengineered (run levels and all those links ugh!) so I can understand the desire to replace it - but there was BSD init easily available which is like Sys V init without the ugh! Then again I am
sure there are some who miss having everything in /etc/rc.
Slackware still uses /etc/rc.d and after using Slackware for years as a
So, when Microsoft wrote MSDOS v2, which supported a directory structure, they obviously could not use the forward-slash as a directory component separator, as it was already firmly established (in code, no less) as the sentinel for command flags. They had to pick a different separator for directory components, and they settled on the backslash (in the command processor), and/either/ the backslash/or/ the forwardslash in the API.
On Tue, 15 Feb 2022 02:36:17 -0000 (UTC)
"NotReal" <NotReal@NoSpam.com> wrote:
Ahem A Rivet's Shot wrote:
Slackware still uses /etc/rc.d and after using Slackware for years
as a
<sigh> youngsters</sigh> In the dim and distant early days of unix
the system went into multi-user by running the shell script /etc/rc -
all the startup code was in that one script.
Ahem A Rivet's Shot wrote:
On Tue, 15 Feb 2022 02:36:17 -0000 (UTC)
"NotReal" <NotReal@NoSpam.com> wrote:
Ahem A Rivet's Shot wrote:
Slackware still uses /etc/rc.d and after using Slackware for years
as a
<sigh> youngsters</sigh> In the dim and distant early days of unix
the system went into multi-user by running the shell script /etc/rc -
all the startup code was in that one script.
You must be older than dirt. :) I have been retired for over 15 years
and started using Slackware circa 1990 for our first web server/mail
server at work. Before that I played with Xenix a bit as a learning
tool. As near as I can remember neither one ever used /etc/rc. What
flavor of Unix or Linux were you using?
Ahem A Rivet's Shot wrote:
On Tue, 15 Feb 2022 02:36:17 -0000 (UTC)
"NotReal" <NotReal@NoSpam.com> wrote:
Ahem A Rivet's Shot wrote:
Slackware still uses /etc/rc.d and after using Slackware for years
as a
<sigh> youngsters</sigh> In the dim and distant early days of
unix the system went into multi-user by running the shell
script /etc/rc - all the startup code was in that one script.
You must be older than dirt. :) I have been retired for over 15 years
and started using Slackware circa 1990 for our first web server/mail
server at work. Before that I played with Xenix a bit as a learning
tool. As near as I can remember neither one ever used /etc/rc. What
flavor of Unix or Linux were you using?
On 10/02/2022 22:38, Chris Green wrote:
Tristan Greaves <nospam.Tristan.Greaves@f1.n770.z30.fidonet.org> wrote:
Re: How does Pi get its time?Ah, thank you. Why did they have to change the name from the almost
By: Chris Green to All on Thu Feb 10 2022 09:07 pm
CG> How do Raspberry Pis know what the time is?
CG> On my Pis NTP isn't installed but they seem to know what the time is >>> CG> OK so how do they do it?
If you are running Raspbian, it could well be timesyncd.
universal ntp I wonder.
It's not the same thing.
NTPD runs all the time and can poll time servers every few minutes and
keep itself very accurate. It can also act as an NTP server that other software can use.
TIMESYNCD just polls an NTP server once and shuts down. It's typically
run only a few times a day by a cron job.
On Wed, 16 Feb 2022 16:27:59 -0000 (UTC)
"NotReal" <NotReal@NoSpam.com> wrote:
Ahem A Rivet's Shot wrote:
On Tue, 15 Feb 2022 02:36:17 -0000 (UTC)
"NotReal" <NotReal@NoSpam.com> wrote:
Ahem A Rivet's Shot wrote:
Slackware still uses /etc/rc.d and after using Slackware for
years as a
<sigh> youngsters</sigh> In the dim and distant early days of
unix the system went into multi-user by running the shell
script /etc/rc - all the startup code was in that one script.
You must be older than dirt. :) I have been retired for over 15
years
I'm still working - coming up on 63 with retirement set to 70,
but I've been in the computer business since the late 1970s when I got involved in the Newbrain project as a vac job - a couple of years
later and I was Chief (only) Hardware Engineer at Torch and back
around the BBC computer project.
and started using Slackware circa 1990 for our first web server/mail
A bit later than that I think - 92 or 93 would be about the earliest for Slackware - I put SLS on a box in 1992 then replaced it with
FreeBSD.
server at work. Before that I played with Xenix a bit as a learning
tool. As near as I can remember neither one ever used /etc/rc.
What flavor of Unix or Linux were you using?
I used XENIX III and V as well as a number of early Unix systems,
the most primitive of which was an Idris system that lacked hardware
memory management and was based on a unix old enough to pre-date fsck
- the combination was not good for a machine used by C developers and
we all got good with icheck, ncheck and a disc patching tool as well
as very familiar with the filesystem internals.
Before that I mainly worked with CP/M and MP/M and avoided MS/PC-DOS and Windows as much as possible.
and started using Slackware circa 1990 for our first web server/mail
On 2022-02-14, Brian Gregory wrote:
It's not the same thing.
NTPD runs all the time and can poll time servers every few minutes and
keep itself very accurate. It can also act as an NTP server that other
software can use.
TIMESYNCD just polls an NTP server once and shuts down. It's typically
run only a few times a day by a cron job.
I didn't know that --- sounds like a poor substitute for ntpd.
On 16/02/2022 19:24, Adam Funk wrote:
On 2022-02-14, Brian Gregory wrote:
It's not the same thing.
NTPD runs all the time and can poll time servers every few minutes and
keep itself very accurate. It can also act as an NTP server that other
software can use.
TIMESYNCD just polls an NTP server once and shuts down. It's typically
run only a few times a day by a cron job.
I didn't know that --- sounds like a poor substitute for ntpd.
In many ways timesyncd is a poor substitute for ntpd.
But there are plenty of cases where it is all you need.
Use ntpd is you need it to act as an ntp server or if you need accuracy
to a fraction of a second.
It seems that my first answer may not be completely correct.
<https://unix.stackexchange.com/questions/305643/ntpd-vs-systemd-timesyncd-how-to-achieve-reliable-ntp-syncing>
Den 2022-02-16 kl. 17:27, skrev NotReal:
and started using Slackware circa 1990 for our first web server/mail
You must have been early.
Slackware was released in mid 1993 according to <https://en.wikipedia.org/wiki/Slackware>
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 418 |
Nodes: | 16 (2 / 14) |
Uptime: | 23:28:32 |
Calls: | 8,804 |
Calls today: | 2 |
Files: | 13,304 |
Messages: | 5,970,205 |