Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.138.174.45
'''apport package hook for systemd
(c) 2014 Canonical Ltd.
Author: Martin Pitt <martin.pitt@ubuntu.com>
'''
import os.path
import apport.hookutils
def add_info(report):
apport.hookutils.attach_hardware(report)
report['SystemdDelta'] = apport.hookutils.command_output(['systemd-delta'])
if not os.path.exists('/run/systemd/system'):
return
# Add details about all failed units, if any
out = apport.hookutils.command_output(['systemctl', '--failed', '--full',
'--no-legend']).strip()
if out:
failed = ''
for line in out.splitlines():
unit = line.split()[0]
if failed:
failed += '------\n'
failed += apport.hookutils.command_output(['systemctl', 'status', '--full', unit])
report['SystemdFailedUnits'] = failed
|