Finding bad systemctl definitions?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
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
add a comment |Â
up vote
1
down vote
favorite
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
1
systemd-analyze verify ...
will do some checks. seeman 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
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
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
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
systemd
asked Sep 13 at 8:37
Paul D Smith
214
214
1
systemd-analyze verify ...
will do some checks. seeman 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
add a comment |Â
1
systemd-analyze verify ...
will do some checks. seeman 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
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
systemd-analyze verify ...
will do some checks. seeman 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