Monitor gdm3

Ralf Mardorf kde.lists at yahoo.com
Tue Aug 10 17:57:59 UTC 2021


On Tue, 10 Aug 2021 13:11:37 -0400, Jerry Geis 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.

Hi,

I'm using lightdm, but more or less the same should apply to any other
display manager, too.



1. First raw information
------------------------

1.1
$ systemctl status lightdm.service

1.2
$ grep EE /var/log/Xorg.0.log



2. Display manager and greeter related human readable text log files
--------------------------------------------------------------------

$ sudo ls -hAl /var/log/lightdm/
total 148K
-rw------- 1 root root 5.0K Aug  4 21:48 lightdm.log
-rw------- 1 root root 6.0K Aug  3 03:52 lightdm.log.old
-rw------- 1 root root  16K Aug  4 21:48 seat0-greeter.log
-rw------- 1 root root  16K Jul  3 21:10 seat0-greeter.log.old
-rw------- 1 root root  14K Jun 28  2016 x-0-greeter.log
-rw------- 1 root root  14K Jun 27  2016 x-0-greeter.log.old
-rw------- 1 root root  21K Aug 10 14:40 x-0.log
-rw------- 1 root root  34K Aug  3 03:52 x-0.log.old
-rw------- 1 root root 2.1K Feb 11  2019 x-1.log

Use grep, cat, less, head, tail etc. or any editor. Root privileges
might be required.



3. journalctl
-------------

The log files that makes Linux an absolute joke in the POSIX realm.

$ man journalctl

If the manual page shouldn't provide enough help, upstream is probably
deeply grateful for user requests.

You could avoid using the "journalctl" command by using the "strings"
command and pipe throug grep, cat, less, head, tail etc. instead of
learning how to use the "journalctl" command.

Not very good examples, but at least examples:

$ strings /var/log/journal/*/system.journal | grep -i lightdm -B1 -A3

$ strings /var/log/journal/*/user-$(id -u).journal | grep -i lightdm -B1 -A3

Regards,
Ralf




More information about the ubuntu-users mailing list