MINOR: debug: start to create a new struct post_mortem
authorWilly Tarreau <w@1wt.eu>
Wed, 22 Nov 2023 10:28:06 +0000 (11:28 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Nov 2023 14:39:21 +0000 (15:39 +0100)
commit0184597522dc725d9659ccd9e7e6b256022ce743
treedda1aeab281ce5007eee28275e2e82fdee982a58
parent2268f10dd6fb8852b04fd302f095556337ec7372
MINOR: debug: start to create a new struct post_mortem

The goal here is to accumulate precious debugging information in a
struct that is easy to find in memory. It's aligned to 256-byte as
it also helps. We'll progressively add a lot of info about the
startup conditions, the operating system, the hardware and hypervisor
so as to limit the number of round trips between developers and users
during debugging sessions. Also, opening a core file with an hex editor
should often be sufficient to extract most of the info.

In addition, a new "show dev" command will show these information so
that they can be checked at runtime without having to wait for a crash
(e.g. if a limit is bad in a container, better know it early).

For now the struct only contains utsname that's fed at boot time.
src/debug.c