2023-10-14 19:58:01

by Artem S. Tashkinov

[permalink] [raw]
Subject: Printing HW configuration on boot

Hi everyone,

dmesg is an invaluable source of information about the system however
oftentimes it's the only source of information and it gets really hard
to extract information from it.

It would be great if someone coded the following feature: a printout of
system configuration before the kernel runs /sbin/init, e.g. something
like this:

======= Detected hardware configuration =======
Arch: x86-64, EFI, Secure boot enabled
CPU: Intel/AMD Something; X cores/Y threads
GPU: AMD/Intel/NVIDIA VEN_ID/DEV_ID, VRAM MB
RAM: 32614128K/33414620K available, ECC enabled
Motherboard: Vendor, Model, BIOS revision
Console: i915drmfb, 1024x768@24bit
===============================================

Some (all?) of this information is already there but it's hard to find
and read.

Thanks a ton,
Artem


2023-10-14 22:32:47

by Linus Torvalds

[permalink] [raw]
Subject: Re: Printing HW configuration on boot

On Sat, 14 Oct 2023 at 12:57, Artem S. Tashkinov <[email protected]> wrote:
>
> dmesg is an invaluable source of information about the system however
> oftentimes it's the only source of information and it gets really hard
> to extract information from it.

Honestly, I don't think this is "fixable". One issue is that different
people will want different "hardware info". Things like CPU model can
be interesting for some uses, but completely useless most of the time
for others. Same goes very much for GPU etc.

So then in other cases you want all of lspci etc, which is generally
too verbose for dmesg anyway (and even if it isn't, you again end up
with some people wanting not just vendor/model, but submodels and PCI
BAR information).

And if some problem happens during boot, you want the printouts to be
as immediate as possible, *not* some "summary once we've gathered
everything".

In other words: what you want for one bugreport is likely very
different what some other person wants for another unrelated issue,
both in content, verbosity, _and_ in timing.

For some issues, you'll want the dmidecode output, because motherboard
and BIOS versions matter. For other situations, none of it matters at
all, because saying "RPi 4 with 8MB" pretty much describes the
hardware. And other situations want a full acpidump.

You can always find *some* issue where exactly what you asked for is
relevant. But then 99% of the time it doesn't matter at all.

There simply isn't some kind of "one right output".

Linus