Closed rfmoz closed 11 months ago
Tuptime registers the time reported by the system, so if it lost their resources to keep the clock updated, the problem is going to be registered at startup.
In this case, is due a drained RTC battery, but analyze the behaviour:
This is a rare situation and that register let us guess that something may be wrong. In case of prefering to reach a valid time sinchronization before executing Tuptime, systemd-time-wait-sync.service
must be enabled, but it could never reach that sinchronization and, therefore, never do the expected execution and lost a startup register.
If the event has just happened before the current startup, is it possible to delete the last register on the database and Tuptime will recreate it correctly on next execution.
# cp /var/lib/tuptime/tuptime.db /var/lib/tuptime/tuptime.db.back
# echo "DELETE FROM tuptime WHERE rowid = (SELECT MAX(rowid) FROM tuptime); VACUUM" | sqlite3 /var/lib/tuptime/tuptime.db
[1] - https://www.freedesktop.org/software/systemd/man/latest/systemd-timesyncd.service.html
After a normal startup, with a downtime of various days, Tuptime register the previous downtime as current uptime:
Inspecting the
journal -b
of the system reports this time jumps. Take into account that the current date is 2023-12-09: