How to see /var/log/messages under systemd

I was debugging something in Solus and I absolutely needed to see what was in /var/log/messages. Trouble is , Solus does not have /var/log messages, it only keeps the systemd journal.

So I went searching with ddg and found

Unless you have changed the configuration related to the logging system, Journald is absolutely not guaranteed to have everything that is in /var/log/messages.

So can anyone tell me how can I see /var/log/messages in my Solus?
Do I have to run syslogd as well as systemd?

1 Like

Hi Neville, :wave:

Hmm, I didn´t know that.

That I cannot tell as I have no experience with Solus whatsoever. Sorry. :roll_eyes:

For looking into log-messages I mostly make use ov lnav (Log File Navigator).

For me (that´s Lubuntu, BodhiLinux and Debian) this works well, but in these cases it´s /var/log/syslog[...]. So that´s not the case with Solus, as you said.

Still: perhaps lnav might be of help after all… :question: :thinking:

lnav v0.11.2 might be a starting point.

On Log Formats - lnav v0.11.2 I looked for “syslogd” and “systemd” as search-words and found entries for both.
I guess you may make more of it than I can. Perhaps you might want to take a look at it…

Sorry I can´t be of more help. :confused:

Many greetings
Rosika :slightly_smiling_face:

1 Like

Hi Rosika,
I had a look at lnav.
Apparently the messages file is not considered to be a logfile, so lnav does not mention it.

The situation is easy in Debian… it keeps a systemd journal AND runs the syslog daemon.

The situation is worse in Void. It does not use systemd, and by default it does not run rsyslogd. So there are no logs at all. However I was able to install rsyslogd, and run the daemon, and magically a messages file appeared. But it only contains userland messages… I wanted kernel messages. Maybe I can tweak rsyslogd.conf to fix that.

In Solus there is some progress. I found that
journalctl
lists userland messages
and
journalctl -k
lists kernel messages.
But the message I wanted was not there?

How can something be so simple in Debian, and an absolute pain elsewhere?
Regards
Neville

2 Likes

I have discovered that Ubuntu and derivatives do not use /var/log/messages
they use
/var/log/syslog
instead.
Now I understand your reply.
Its surprising the things that can confuse me.

1 Like

Hi Neville, :wave:

That´s good. I wonder why Solus does things differently…

Ah, I see. That´s a totally different case then.

As far as journalctl is concerned I use that too (for boot logs), together with dmesg. The command I employ for that is:

journalctl -b > veränderlich3.txt; and echo "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN" >> veränderlich3.txt; and dmesg -T >> veränderlich3.txt; and firejail --disable-mnt --read-only=/home/rosika featherpad veränderlich3.txt

Perhaps someone else here in the forum can be of better help to you, Neville…

Many greetings from Rosika :slightly_smiling_face:

1 Like

Hi Neville, :wave:

I don´t know whether this would be of any help. I found this one:

Haven´t looked through it though…

Many greetings from Rosika :slightly_smiling_face:

Thank you Rosika

It says use sudo journalctl to have the kernel logs included
I used journalctl -k I think that gives only kernel logs

Neville

1 Like

Hi Neville, :wave:

Hmm, I´m afraid I´m running out of ideas. :slightly_frowning_face:

I´ve no idea if it helps at all but for a more complete overview of what might be achieved by employing journalctl you could take a look at
journalctl › systemd › Wiki › ubuntuusers.de .

If you have installed the TranslateLocally add-on in your (firefox) browser [see:
TranslateLocally as firefox add-on - Tutorials & Resources - It’s FOSS Community ]

you could display the page in English…

Sorry that I can´t me of more help. :slightly_frowning_face:

Many greetings from Rosika :slightly_smiling_face:

P.S.:

I don´t know what exactly you are looking for, Neville, but if the issue was covered by the kernel´s ring buffer logs you could take a look at
https://www.howtogeek.com/449335/how-to-use-the-dmesg-command-on-linux/ ,
which provides a great overview of the dmesg command.

1 Like

I use this when I have a need, but it works well:

https://apps.kde.org/ksystemlog/

What sort of message are you looking for?

2 Likes

I am looking for a message from nouveau about whether it was able to load a particular piece of firmware for my graphics card

In Debian it appeares in /var/log/messages and looks like this

 Nov 5 21:06:08 trinity kernel: [ 58.989614] nouveau 0000:01:00.0: firmware: direct-loading firmware nouveau/nva8_fuc084

I want to check whether nouveau is using that piece of firmware.
lsmod does not help, it is not a kernel module, it is firmware. I think it loads it onto the graphics card.

It would seem that systemd does keep all the messages that rsyslogd used to.

Thanks,
Neville

Hi Rosika,
If you look at my reply to @kgwoo , you will see what I am looking for.
Regards
Neville

1 Like

My nVidia drivers show up in this x.org Log, which I found under the menu Logs/Services/X.org Log. Of course, ymmv! :wink:

2 Likes

Hi again, :wave:

@kgwoo:

Thanks for mentioning ksystemlog. I installed it on my system (Lubuntu 20.04) a long time ago and haven´t used it for quite a while now.
I just took a look at it. It´s really quite helpful. :wink:

@nevj:

Thanks, Neville, for the exact description of what you are looking for.
I looked up nouveau:
So it´s “the open-source Nouveau driver for NVIDIA graphics cards” (according to Nouveau - ArchWiki )

I have to admit I had no idea what graphics card is installed on my system, so I looked it up:

lspci -nnk | grep -i VGA -A2
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller [8086:0152] (rev 09)
        DeviceName:  Onboard IGD
        Subsystem: Lenovo Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller [17aa:3693]

So it´s something else here, I guess… :thinking:

Is there anything in /lib/firmware/nouveau?
(https://www.linuxquestions.org/questions/linux-newbie-8/dmesg-direct-firmware-load-for-nouveau-nv84_xuc00f-failed-with-error-2-a-4175691503/ )

The only other thing I could find was:

“Know which firmware my linux kernel has loaded since booting”

See: Know which firmware my linux kernel has loaded since booting - Server Fault

If your kernel is built with dynamic debug support (CONFIG_DYNAMIC_DEBUG), you can use a boot parameter to enable debug messages for the firmware loader.
It should catch all firmware loads, unless a particular driver does something strange and does not use the kernel’s firmware loading API for some reason.

Add the following to your boot parameters:

For kernels 2.6 - 4.16: dyndbg="file drivers/base/firmware_class.c +fmp"

For kernels 4.17 and later: dyndbg="file drivers/base/firmware_loader/main.c +fmp"

(For reference, file blah/foo.c +fmp means “for all debug calls in the kernel source file blah/foo.c, enable dynamic debug printing, and make the message show the filename and module name”. See the kernel docs for more detail.)

After booting, run dmesg | grep firmware_class. Of particular interest are lines with firmware_class:fw_get_filesystem_firmware, which should be sandwiched between calls to __allocate_fw_priv and __free_fw_priv.

All firmware loads will be logged until you reboot or disable dynamic debugging.

No idea whether this would help at all… :thinking:

Many greetings
Rosika :slightly_smiling_face:

Hi Rosika,
Thank you. That could be the explanation.
If dynamic-debug support is not enabled in Solus, it will not produce the message.
I shall investigate. Need to look at Void too.
Regards
Neville

1 Like

Hi Neville, :wave:

you´re welcome.

That might be it. You´re certainly thinking in the right direction.

Many greetings
Rosika :slightly_smiling_face: