Sample Header Ad - 728x90

How can I detect if a reboot happened

0 votes
1 answer
82 views
I come accross some unexpected auto reboot and no vmcore left. So I want to catch whenever a kernel reboot happened and who call this. As I thought before, when I input a reboot command, then the SYSCALL_DEFINE4(reboot) will be invoked and then kernel goes into the function kernel_restart. But the fact was, when I used kprobe to trace kernel_restart and entered reboot,nothing was caught ---- I've already tested on some other kernel function such as do_sys_open and ksys_umount and they all worked fine so at least my use of kprobe is not wrong. Now I wonder that is there any other way in kernel to call a reboot?
Asked by NotMe1993 (61 rep)
Sep 20, 2024, 03:32 AM
Last activity: Sep 23, 2024, 01:27 AM