<div dir="ltr">Good day,<br>we have been using LTTng successfully to capture snapshots on user defined tracepoints and it did provide invaluable to debug our issues. Thanks to all the contributors of this project!<br><br>We'd like to know if it would be possible to trigger on a kernel panic? I might be dubiously possible as you would still need to have the file-system working to write the results but I should ask.<br><br>Looking at available kernel syscall, the "reboot" one seems like a good candidate, however I was not able to capture a snapshot on it. I have tested the setup below with "--name=chdir" syscall and it works, "cd" to a directory will create a trace. But no dice with reboot.<br><br>Would you have any suggestions?<br>Thanks for your help,<br>Cheers<div>Damien<br><br>============================<br><br># Prep output dir<br>mkdir /application/trace/<br>rm -rf /application/trace/*<br><br># Create session<br>sudo lttng destroy snapshot-trace-session<br>sudo lttng create snapshot-trace-session --snapshot --output="/application/trace/"<br>sudo lttng enable-channel --kernel --num-subbuf=8 channelk<br>sudo lttng enable-channel --userspace --num-subbuf=8 channelu</div><div>
<br># Configure session<br>sudo lttng enable-event --kernel --syscall --all --channel channelk<br>sudo lttng enable-event --kernel --tracepoint "sched*" --channel channelk<br>sudo lttng enable-event --userspace --all --channel channelu<br>sudo lttng add-context -u -t vtid -t procname<br>sudo lttng remove-trigger trig_reboot<br>sudo lttng add-trigger --name=trig_reboot \<br> --condition=event-rule-matches --type=kernel:syscall:entry \<br> --name=reboot\<br> --action=snapshot-session snapshot-trace-session \<br> --rate-policy=once-after:1<br><br># start & list info<br>sudo lttng start<br>sudo lttng list snapshot-trace-session<br>sudo lttng list-triggers</div><div><br>#======== test it...<br>sudo reboot <br><br></div><div>#======= reconnect and Nothing :(<br>$ ls -alu /application/trace/<br>drwxr-xr-x 2 u u 4096 May 15 2024 .<br>drwxr-xr-x 10 u u 4096 May 15 2024 ..<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="color:rgb(34,34,34)"><br></div></div></div></div></div>