Linux-Kernel: Printk() Indexing
lwn.net
lwn.net
But to be honest, so have ifconfig, hostname, df...
At least in procfs they add things (columns, lines) so apart from meminfo I don't know of changing the meaning of fields.
«Really. Shut up.
The whole "no regressions" thing is very much about the fact that we don't waste users time.»
https://linux.kernel.narkive.com/7hMPh8zX/patch-revert-9fc21...
Of course in an ideal world the extent of the intended promise would be clearly written down in some obvious place. But we don't live in an ideal world.
"It's not that the kernel ABI (with all the system calls, all the /proc files, all the ioctl's, etc) is set in stone and "sacred". Absolutely anything can be changed, wildly.
But if it turns out that applications (or hardware) that people use end up breaking noticeably, then that is a regression."
It seems like that was the more elegant solution vs enabling debugfs, running through the list of error messages to ensure nothing changed. How many distros even ship with debugfs enabled by default?
Edit: formatting
I think the better morale of the story is to not rely on third party log output to troubleshoot problems. If you want to be notified when the CPU catches fire then you should have a daemon watching CPU temp waiting to trigger the event, not relying on some black box to log the correct line at the right time and some other black box to match the line against some ancient regex that nobody understands anymore. At the very least your temperature monitoring daemon should `printk` a message you decided upon instead of someone else.
Almost all of them, try `mount | grep ^debugs` or at least `/proc/filesystems |grep debugfs`. It's root-only though.
https://github.com/FRRouting/frr/pull/6766
It's pretty much the same thing, all occurences of "zlog_debug" and the like create an entry in a separate ELF section. The section can be accessed both at runtime by the program itself as well as offline by reading the appropriate ELF headers (there's an extraction tool in the codebase that does that, it even works cross-OS cross-CPU cross-endian).
disclaimer: it's my code ;)
disclaimer[2]: this will not work without major overhaul on OSX or Windows. It relies on the binary format being ELF.
disclaimer[3]: the PR linked above is only the "core" of it, you may have to fish out other pieces elsewhere.