I use systemd-timesyncd
, which writes a status (probably) to a file at every synchronization. As the Arch documentation mentions,
The service writes to a local file
/var/lib/systemd/clock
with every synchronization. This location is hard-coded and cannot be changed.
The file is actually different on a RPi but the problem is the same.
On the other hand, /dev/shm
is an in-memory filesystem, so would linking the status file to a file over there lower the SD card wear?
root@rpi1 /v/l/p/s/timesync# pwd
/var/lib/private/systemd/timesync
root@rpi1 /v/l/p/s/timesync# ll
total 0
lrwxrwxrwx 1 root root 14 Jan 1 00:50 clock -> /dev/shm/clock
The status above is after the creation of the link and restart of the service.
Since systemd-timesyncd
has not recreated the file (and remove the link) I would be inclined to think that this could be a reasonable workaround for the often-written-to file on the SD card.