You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Kernel error scanning with journalctl (no dmesg) #292
Later we should drop such "screen scraping" and use something more robust like journalctl --dmesg --priority err with no false positive (for instance a debug message with one of these keywords) and no false negative (e.g. ERR:)
@marc-hb, what is wrong with dmesg --level=err to filter the prints?
We still need to filter SOF erros (likely) and for the reports we need to context around the errors (plus the full dmesg)
@marc-hb, sure, journalctl is an OS while dmesg is a command line tool from util-linux.
it's a ring buffer so it may be incomplete
and journalctl takes the kernel log from the same ring buffer...
It's not available after a reboot
journalctl saves the logs to somewhere, so any syslog tools (/var/log/kernel.log.* in my machines)
ktime timestamps are relatively useless because difficult to relate to user space
dmesg --time-format ctime
I think the issue is that the timestamps are hard to relate to the firmware stamps.
It's missing the hostname
Hrm true, but I usually know where I have run it.
no way to combine with user space logs if/when desired
dmesg -u
If you think journalctl will give us better CI reports, I'm all for it, don't get me wrong.
But running the tests on my own machines are getting harder and harder.
I'll remain:
I bet you'll observe the same thing with /var/log/whatever
dmesg --time-format ctime
I just tried this and I found a 72 seconds gap with journalctl -k, any idea why? Suspend/resume?
After a LOT of time spent troubleshooting NTP issues, I have 100% confidence in journalctl timestamps, of course as long as NTP is working #908)
Hrm true, but I usually know where I have run it.
"works4me" ? :-)
dmesg -u
This is new to me. I tried it and the output was very surprising: it seems to have only systemd logs, no other user space logs and almost no kernel logs.
If you think journalctl will give us better CI reports, I'm all for it, don't get me wrong.
Yes for the reasons listed above.
sof-test has already a very strong dependency on journalctl (see old comments above) so there's no reason to stop short and keep using dmesg in just one sof-test place bar all the others.
zsh: command not found: journalctl
I'm sorry but we have barely bandwidth to validate only one distribution right now (without even pulseaudio / pipewire...), a growing backlog and like it or not journalctl is definitely the standard. As long as your logging solution has an equivalent to journalctl's --since option then it should be possible to implement some abstraction layer, please send patches! This will also help with:
I think the issue is that the timestamps are hard to relate to the firmware stamps.
That's a very good point. The fw timestamp is typically initialized from ktime but I suspect it can then diverge depending on D3 , innacurate frequency guess in sof-logger and what not? If you find a way to have BOTH ktime and wall clock in captured logs then I'm all for it but as long as we can't easily relate to FW timestamps then it's better to match at least user space logs.
BTW what is the simplest way to read ktime from a shell? I tried a Python one-liner in 46dadd0 but I'm afraid it's not reliable :-(
Activity
fredoh9 commentedon Jul 20, 2020
PR is already available.
#262
xiulipan commentedon Jan 26, 2021
I think this is already done by #529 @fredoh9 Please confirm and close.
fredoh9 commentedon Feb 25, 2021
yes, thank you!
marc-hb commentedon Jun 30, 2022
I'm re-opening this because we're still using
dmesgto capture kernel logs in test reports, example: thesofproject/linux#3731 (comment)dmesghas number of issues:ktimetimestamps are relatively useless because difficult to relate to user spaceujfalusi commentedon Jul 6, 2022
@marc-hb, what is wrong with
dmesg --level=errto filter the prints?We still need to filter SOF erros (likely) and for the reports we need to context around the errors (plus the full dmesg)
marc-hb commentedon Jul 6, 2022
Everything I listed above? :-)
Please prove me wrong but so far I haven't found any
dmesgfeature thatjournalctldoes not have (and of course either can be piped togrepthe same)https://www.bing.com/images/search?q=journalctl+cheat+sheet
ujfalusi commentedon Jul 6, 2022
@marc-hb, sure,
journalctlis an OS whiledmesgis a command line tool from util-linux.and journalctl takes the kernel log from the same ring buffer...
journalctl saves the logs to somewhere, so any syslog tools (/var/log/kernel.log.* in my machines)
dmesg --time-format ctimeI think the issue is that the timestamps are hard to relate to the firmware stamps.
Hrm true, but I usually know where I have run it.
dmesg -uIf you think
journalctlwill give us better CI reports, I'm all for it, don't get me wrong.But running the tests on my own machines are getting harder and harder.
I'll remain:
marc-hb commentedon Jul 7, 2022
I don't understand sorry. I just ran both
dmesgandjournal -kone test device that has been running some sof-test with verbose sof logs:I bet you'll observe the same thing with
/var/log/whateverI just tried this and I found a 72 seconds gap with
journalctl -k, any idea why? Suspend/resume?After a LOT of time spent troubleshooting NTP issues, I have 100% confidence in
journalctltimestamps, of course as long as NTP is working #908)"works4me" ? :-)
This is new to me. I tried it and the output was very surprising: it seems to have only
systemdlogs, no other user space logs and almost no kernel logs.Yes for the reasons listed above.
sof-test has already a very strong dependency on
journalctl(see old comments above) so there's no reason to stop short and keep usingdmesgin just one sof-test place bar all the others.I'm sorry but we have barely bandwidth to validate only one distribution right now (without even pulseaudio / pipewire...), a growing backlog and like it or not
journalctlis definitely the standard. As long as your logging solution has an equivalent to journalctl's--sinceoption then it should be possible to implement some abstraction layer, please send patches! This will also help with:That's a very good point. The fw timestamp is typically initialized from
ktimebut I suspect it can then diverge depending on D3 , innacurate frequency guess in sof-logger and what not? If you find a way to have BOTH ktime and wall clock in captured logs then I'm all for it but as long as we can't easily relate to FW timestamps then it's better to match at least user space logs.BTW what is the simplest way to read
ktimefrom a shell? I tried a Python one-liner in 46dadd0 but I'm afraid it's not reliable :-([-]Kernel error scanning with journalctl[/-][+]Kernel error scanning with journalctl (no dmesg)[/+]marc-hb commentedon Nov 9, 2022
BTW I recently found that Ubuntu 22 still uses
rsyslogdin addition to journald. Weird.