Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

needs-restarting: get systemd boot time from UnitsLoadStartTimestamp #1198

Merged

Conversation

evan-goode
Copy link
Member

For #1184

Following the reproducers in that issue, UnitsLoadStartTimestamp seems to consistently have the correct boot time even when UserspaceTimestamp is incorrect due to set-local-rtc 1. The two times are within a few seconds of each other. I have no idea why UnitsLoadStartTimestamp is correct, maybe systemd reads /etc/adjtime and adjusts the clock after setting UserspaceTimestamp but before setting UnitsLoadStartTimestamp.

For rpm-software-management#1184

Following the reproducers in that issue, UnitsLoadStartTimestamp seems
to consistently have the correct boot time even when UserspaceTimestamp
is incorrect due to `set-local-rtc 1`. The two times are within a few
seconds of each other. I have no idea why UnitsLoadStartTimestamp is
correct, maybe systemd reads /etc/adjtime and adjusts the clock after
setting UserspaceTimestamp but before setting UnitsLoadStartTimestamp.
@ppisar
Copy link
Contributor

ppisar commented Jan 24, 2024

What does happen if you restart systemd with systemctl daemon-reexec. Won't UnitsLoadStartTimestamp reset?

@evan-goode
Copy link
Member Author

What does happen if you restart systemd with systemctl daemon-reexec. Won't UnitsLoadStartTimestamp reset?

All the timestamps stay the same for me on systemd 253.

@ppisar ppisar assigned ppisar and unassigned evan-goode Jan 24, 2024
Copy link
Contributor

@ppisar ppisar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great.

@ppisar ppisar added this pull request to the merge queue Jan 24, 2024
Merged via the queue into rpm-software-management:main with commit ab1a540 Jan 24, 2024
5 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants