Monitor gdm3

Ian Bruntlett ian.bruntlett at gmail.com
Tue Aug 10 17:21:21 UTC 2021


Hi Jerry,

On Tue, 10 Aug 2021 at 18:13, Jerry Geis <jerry.geis at gmail.com> wrote:

> is there a correct way to monitor if gdm3 is alive and well ?
>
> I have a couple of OLD OLD machines I installed 20.04 on - sometimes gdm3
> does not start - but doing "systemctl restart gdm3" everything is fine. So
> I thought I would just monitor that gdm3 starts if not restart it on boot.
>
I am no systemd expert but I did some searching and came up with this....
systemctl is-active --quiet gdm3 && echo Service is running
after having found this:-
https://unix.stackexchange.com/questions/396630/the-proper-way-to-test-if-a-service-is-running-in-a-script

Does that help?


Ian

-- 
-- ACCU - Professionalism in programming - http://www.accu.org
-- My writing - https://sites.google.com/site/ianbruntlett/
-- Free Software page -
https://sites.google.com/site/ianbruntlett/home/free-software
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20210810/898082aa/attachment.html>


More information about the ubuntu-users mailing list