Finding bad systemctl definitions?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
1












I've just had to diagnose a fault that turned out to be because someone had edited a systemd definition (*.service) file and left an error behind. The result was that the service did not show up as failed but also did not run so my question is:




Is there a way to list all systemd units that have service definition errors?




As an example, here is the status of the job that failed:



localhost:~# systemctl status -l custom
● custom.service - Custom script
Loaded: loaded (/usr/lib/systemd/system/custom.service; disabled; vendor
preset: disabled)
Active: inactive (dead)

Sep 12 16:00:25 localhost.localdomain systemd[1]:
[/usr/lib/systemd/system/custom.service:20] Unknown section 'Path'. Ignoring.


I've tried listing dead services but there are many of them and most seem to be correct but just ended - what I want is to find the ones that have genuine errors such as this one.










share|improve this question

















  • 1




    systemd-analyze verify ... will do some checks. see man systemd-analyze.
    – meuh
    Sep 13 at 12:07










  • It is a little verbose but that's certainly good enough for what I want - thanks.
    – Paul D Smith
    Sep 13 at 14:15














up vote
1
down vote

favorite
1












I've just had to diagnose a fault that turned out to be because someone had edited a systemd definition (*.service) file and left an error behind. The result was that the service did not show up as failed but also did not run so my question is:




Is there a way to list all systemd units that have service definition errors?




As an example, here is the status of the job that failed:



localhost:~# systemctl status -l custom
● custom.service - Custom script
Loaded: loaded (/usr/lib/systemd/system/custom.service; disabled; vendor
preset: disabled)
Active: inactive (dead)

Sep 12 16:00:25 localhost.localdomain systemd[1]:
[/usr/lib/systemd/system/custom.service:20] Unknown section 'Path'. Ignoring.


I've tried listing dead services but there are many of them and most seem to be correct but just ended - what I want is to find the ones that have genuine errors such as this one.










share|improve this question

















  • 1




    systemd-analyze verify ... will do some checks. see man systemd-analyze.
    – meuh
    Sep 13 at 12:07










  • It is a little verbose but that's certainly good enough for what I want - thanks.
    – Paul D Smith
    Sep 13 at 14:15












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I've just had to diagnose a fault that turned out to be because someone had edited a systemd definition (*.service) file and left an error behind. The result was that the service did not show up as failed but also did not run so my question is:




Is there a way to list all systemd units that have service definition errors?




As an example, here is the status of the job that failed:



localhost:~# systemctl status -l custom
● custom.service - Custom script
Loaded: loaded (/usr/lib/systemd/system/custom.service; disabled; vendor
preset: disabled)
Active: inactive (dead)

Sep 12 16:00:25 localhost.localdomain systemd[1]:
[/usr/lib/systemd/system/custom.service:20] Unknown section 'Path'. Ignoring.


I've tried listing dead services but there are many of them and most seem to be correct but just ended - what I want is to find the ones that have genuine errors such as this one.










share|improve this question













I've just had to diagnose a fault that turned out to be because someone had edited a systemd definition (*.service) file and left an error behind. The result was that the service did not show up as failed but also did not run so my question is:




Is there a way to list all systemd units that have service definition errors?




As an example, here is the status of the job that failed:



localhost:~# systemctl status -l custom
● custom.service - Custom script
Loaded: loaded (/usr/lib/systemd/system/custom.service; disabled; vendor
preset: disabled)
Active: inactive (dead)

Sep 12 16:00:25 localhost.localdomain systemd[1]:
[/usr/lib/systemd/system/custom.service:20] Unknown section 'Path'. Ignoring.


I've tried listing dead services but there are many of them and most seem to be correct but just ended - what I want is to find the ones that have genuine errors such as this one.







systemd






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 13 at 8:37









Paul D Smith

214




214







  • 1




    systemd-analyze verify ... will do some checks. see man systemd-analyze.
    – meuh
    Sep 13 at 12:07










  • It is a little verbose but that's certainly good enough for what I want - thanks.
    – Paul D Smith
    Sep 13 at 14:15












  • 1




    systemd-analyze verify ... will do some checks. see man systemd-analyze.
    – meuh
    Sep 13 at 12:07










  • It is a little verbose but that's certainly good enough for what I want - thanks.
    – Paul D Smith
    Sep 13 at 14:15







1




1




systemd-analyze verify ... will do some checks. see man systemd-analyze.
– meuh
Sep 13 at 12:07




systemd-analyze verify ... will do some checks. see man systemd-analyze.
– meuh
Sep 13 at 12:07












It is a little verbose but that's certainly good enough for what I want - thanks.
– Paul D Smith
Sep 13 at 14:15




It is a little verbose but that's certainly good enough for what I want - thanks.
– Paul D Smith
Sep 13 at 14:15















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f468742%2ffinding-bad-systemctl-definitions%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f468742%2ffinding-bad-systemctl-definitions%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay