Bug 1262691 - [RFE] needs-restarting script should provide more verbose output
[RFE] needs-restarting script should provide more verbose output
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum-utils (Show other bugs)
7.1
Unspecified Unspecified
medium Severity low
: rc
: ---
Assigned To: Michal Domonkos
BaseOS QE Security Team
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-14 02:18 EDT by Karel Srot
Modified: 2017-09-27 23:21 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1262688
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Karel Srot 2015-09-14 02:18:40 EDT
+++ This bug was initially created as a clone of Bug #1262688 +++

Description of problem:

The needs-restarting script output only lists processes that should be restarted but doesn't provide any information about dependencies that actually caused that the restart is needed. 

E.g.:
  4674 : ./testprog

Please introduce a more verbose output (-v option) that would provide information about the dependencies. ATM I am using similar change for debugging purposes on various places of the code:

                if float(pkg.installtime) > float(pid_start):
                    needing_restart.add(pid)
                    found_match = True
+                   print "debug: %s needs restart due to usage of %s from %s" % (pid, just_fn, pkg.name)
                    continue
                if just_fn in pkg.ghostlist:
                    bogon = True

but a more user friendly option would be better. E.g. to have an output as:

  4674 : ./testprog  due to /path/to/library/consumed from libtestpkg-1.0-1

or more compact

  4674 : ./testprog (/path/to/library/consumed from libtestpkg-1.0-1)

or just (as it is easy to find an appropriate package later)

  4674 : ./testprog (/path/to/library/consumed)

Note You need to log in before you can comment on or make changes to this bug.