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 #527

Conversation

inknos
Copy link
Contributor

@inknos inknos commented Mar 13, 2024

No description provided.

@inknos inknos force-pushed the needs-restarting-units-load-start-time branch from 1ed1009 to eac7a3d Compare March 13, 2024 12:31
plugins/needs_restarting.py Outdated Show resolved Hide resolved
Copy link
Member

@evan-goode evan-goode left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! Related: rpm-software-management/dnf5#1198

@inknos
Copy link
Contributor Author

inknos commented Mar 14, 2024

thanks for the review. apparently there is a failing test that need to pass before merging

@inknos inknos force-pushed the needs-restarting-units-load-start-time branch from eac7a3d to bfcd1d2 Compare March 14, 2024 12:21
@inknos
Copy link
Contributor Author

inknos commented Mar 14, 2024

thanks for the review. apparently there is a failing test that need to pass before merging

I am changing the logged message to debug level since it could be quite annoying and I don't want to change the output of the plugin

@jan-kolarik jan-kolarik self-assigned this Mar 18, 2024
@jan-kolarik jan-kolarik merged commit 74de8fe into rpm-software-management:master Mar 18, 2024
3 checks passed
evan-goode added a commit to evan-goode/dnf-plugins-core that referenced this pull request Oct 3, 2024
Resolves https://issues.redhat.com/browse/RHEL-35577.

Get the boot time from UnitsLoadStartTimestamp if systemd is available,
but make sure to use the kernel boot time for calculating process start
times using data from procfs. The previous attempt [1] at this failed to
do so and introduced a regression [2].

Also, get the kernel boot time from the btime field of /proc/stat instead of
calculating it from /proc/uptime, to be consistent with what procps-ng
does.

[1] rpm-software-management#527
[2] https://issues.redhat.com/browse/RHEL-39775
evan-goode added a commit to evan-goode/dnf-plugins-core that referenced this pull request Oct 7, 2024
Resolves https://issues.redhat.com/browse/RHEL-35577.

Get the boot time from UnitsLoadStartTimestamp if systemd is available,
but make sure to use the kernel boot time for calculating process start
times using data from procfs. The previous attempt [1] at this failed to
do so and introduced a regression [2].

Also, get the kernel boot time from the btime field of /proc/stat instead of
calculating it from /proc/uptime, to be consistent with what procps-ng
does.

[1] rpm-software-management#527
[2] https://issues.redhat.com/browse/RHEL-39775
evan-goode added a commit to evan-goode/dnf-plugins-core that referenced this pull request Oct 7, 2024
Resolves https://issues.redhat.com/browse/RHEL-35577.

Get the boot time from UnitsLoadStartTimestamp if systemd is available,
but make sure to use the kernel boot time for calculating process start
times using data from procfs. The previous attempt [1] at this failed to
do so and introduced a regression [2].

Also, get the kernel boot time from the btime field of /proc/stat instead of
calculating it from /proc/uptime, to be consistent with what procps-ng
does.

[1] rpm-software-management#527
[2] https://issues.redhat.com/browse/RHEL-39775
evan-goode added a commit to evan-goode/dnf-plugins-core that referenced this pull request Oct 7, 2024
Resolves https://issues.redhat.com/browse/RHEL-35577.

Get the boot time from UnitsLoadStartTimestamp if systemd is available,
but make sure to use the kernel boot time for calculating process start
times using data from procfs. The previous attempt [1] at this failed to
do so and introduced a regression [2].

Also, get the kernel boot time from the btime field of /proc/stat instead of
calculating it from /proc/uptime, to be consistent with what procps-ng
does.

[1] rpm-software-management#527
[2] https://issues.redhat.com/browse/RHEL-39775
evan-goode added a commit to evan-goode/dnf-plugins-core that referenced this pull request Oct 11, 2024
Resolves https://issues.redhat.com/browse/RHEL-35577.

Get the boot time from UnitsLoadStartTimestamp if systemd is available,
but make sure to use the kernel boot time for calculating process start
times using data from procfs. The previous attempt [1] at this failed to
do so and introduced a regression [2].

Also, get the kernel boot time from the btime field of /proc/stat instead of
calculating it from /proc/uptime, to be consistent with what procps-ng
does.

[1] rpm-software-management#527
[2] https://issues.redhat.com/browse/RHEL-39775
evan-goode added a commit to evan-goode/dnf-plugins-core that referenced this pull request Oct 11, 2024
Resolves https://issues.redhat.com/browse/RHEL-35577.

Get the boot time from UnitsLoadStartTimestamp if systemd is available,
but make sure to use the kernel boot time for calculating process start
times using data from procfs. The previous attempt [1] at this failed to
do so and introduced a regression [2].

Also, get the kernel boot time from the btime field of /proc/stat instead of
calculating it from /proc/uptime, to be consistent with what procps-ng
does.

[1] rpm-software-management#527
[2] https://issues.redhat.com/browse/RHEL-39775
ppisar pushed a commit that referenced this pull request Oct 14, 2024
Resolves https://issues.redhat.com/browse/RHEL-35577.

Get the boot time from UnitsLoadStartTimestamp if systemd is available,
but make sure to use the kernel boot time for calculating process start
times using data from procfs. The previous attempt [1] at this failed to
do so and introduced a regression [2].

Also, get the kernel boot time from the btime field of /proc/stat instead of
calculating it from /proc/uptime, to be consistent with what procps-ng
does.

[1] #527
[2] https://issues.redhat.com/browse/RHEL-39775
evan-goode added a commit to evan-goode/dnf-plugins-core that referenced this pull request Nov 19, 2024
Resolves https://issues.redhat.com/browse/RHEL-35577.

Get the boot time from UnitsLoadStartTimestamp if systemd is available,
but make sure to use the kernel boot time for calculating process start
times using data from procfs. The previous attempt [1] at this failed to
do so and introduced a regression [2].

Also, get the kernel boot time from the btime field of /proc/stat instead of
calculating it from /proc/uptime, to be consistent with what procps-ng
does.

[1] rpm-software-management#527
[2] https://issues.redhat.com/browse/RHEL-39775
kontura pushed a commit that referenced this pull request Nov 21, 2024
Resolves https://issues.redhat.com/browse/RHEL-35577.

Get the boot time from UnitsLoadStartTimestamp if systemd is available,
but make sure to use the kernel boot time for calculating process start
times using data from procfs. The previous attempt [1] at this failed to
do so and introduced a regression [2].

Also, get the kernel boot time from the btime field of /proc/stat instead of
calculating it from /proc/uptime, to be consistent with what procps-ng
does.

[1] #527
[2] https://issues.redhat.com/browse/RHEL-39775
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants