1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "NEEDS-RESTARTING" "1" "Apr 24, 2024" "4.7.0" "dnf-plugins-core"
.SH NAME
needs-restarting \- redirecting to DNF needs-restarting Plugin
.sp
Check for running processes that should be restarted.
.SH SYNOPSIS
.sp
\fBdnf needs\-restarting [\-u] [\-r] [\-s]\fP
.SH DESCRIPTION
.sp
\fIneeds\-restarting\fP looks through running processes and tries to detect those that use files from packages that have been updated after the given process started. Such processes are reported by this tool.
.sp
Note that in most cases a process should survive update of its binary and libraries it is using without requiring to be restarted for proper operation. There are however specific cases when this does not apply. Separately, processes often need to be restarted to reflect security updates.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Needs\-restarting will try to guess the boot time using three different methods:
.INDENT 0.0
.TP
.B \fBUnitsLoadStartTimestamp\fP
D\-Bus property on \fB/org/freedesktop/systemd1\fP\&.
Works unless the system was not booted with systemd,
such as in (most) containers.
.TP
.B \fBst_mtime of /proc/1\fP
Reflects the time the first process was run after booting.
This works for all known cases except machines without
a RTC—they awake at the start of the epoch.
.TP
.B \fB/proc/uptime\fP
Seconds field of \fB/proc/uptime\fP subtracted from the current time.
Works for machines without RTC if the current time is reasonably correct.
Does not work on containers which share their kernel with the
host—there, the host kernel uptime is returned.
.UNINDENT
.UNINDENT
.UNINDENT
.sp
\fBWARNING:\fP
.INDENT 0.0
.INDENT 3.5
Some systems are configured to read the RTC time in the local time
zone. This mode cannot be fully supported. It will create various problems
with time zone changes and daylight saving time adjustments. The RTC time
is never updated, it relies on external facilities to maintain it. \fBIf at
all possible, use RTC in UTC by calling\fP \fBtimedatectl set\-local\-rtc 0\fP\&.
See \fBman timedatectl\fP for more information.
.UNINDENT
.UNINDENT
.SH OPTIONS
.sp
All general DNF options are accepted, see \fIOptions\fP in \fBdnf(8)\fP for details.
.INDENT 0.0
.TP
.B \fB\-u, \-\-useronly\fP
Only consider processes belonging to the running user.
.TP
.B \fB\-r, \-\-reboothint\fP
Only report whether a reboot is required (exit code 1) or not (exit code 0).
.TP
.B \fB\-s, \-\-services\fP
Only list the affected systemd services.
.UNINDENT
.SH CONFIGURATION
.sp
\fB/etc/dnf/plugins/needs\-restarting.d/\fP
.sp
\fB/etc/dnf/plugins/needs\-restarting.d/pkgname.conf\fP
.sp
Packages can be added to \fBneeds\-restarting\fP via conf files in config
directory. Config files need to have \fB\&.conf\fP extension or will be ignored.
.sp
More than one package is allowed in each file (one package per line) although
it is advised to use one file for each package.
.sp
Example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
echo \(dqdwm\(dq > /etc/dnf/plugins/needs\-restarting.d/dwm.conf
.ft P
.fi
.UNINDENT
.UNINDENT
.SH AUTHOR
See AUTHORS in your Core DNF Plugins distribution
.SH COPYRIGHT
2024, Red Hat, Licensed under GPLv2+
.\" Generated by docutils manpage writer.
.
|