Skip to content

system: report why the node last reset - #558

Open
TurkeyMan wants to merge 1 commit into
masterfrom
agent/reset-reason
Open

system: report why the node last reset#558
TurkeyMan wants to merge 1 commit into
masterfrom
agent/reset-reason

Conversation

@TurkeyMan

Copy link
Copy Markdown
Member

A restart that never reaches the panic handler leaves no core dump, so a brownout, a clean reboot and a watchdog reset are indistinguishable after the fact - the boot banner is gone as soon as the log ring turns over.

Prompted by a live case: an ESP32-S3 was found with an unexplained 5-hour-old restart. Seven core dumps on its filesystem all carried the SHA of older images, which proved the running firmware had never panicked - but left no way to tell what did restart it.

Platforms that know, report it. ESP32 maps esp_reset_reason() (power-on, external pin, software, panic, interrupt/task/other watchdog, deep-sleep wake, brownout, sdio, usb, jtag). Linux returns null - the supervisor relaunches the process and the reason it stopped lives in the supervisor's log, not in anything the new process can read - and the line is omitted when there is nothing to say.

Uptime:   20s
Reset:    software

Also readable as /system/sysinfo reset-reason. Verified on hardware; 139/139 modules pass.

🤖 Generated with Claude Code

A restart that never reaches the panic handler leaves no core dump, so a
brownout, a clean reboot and a watchdog reset are indistinguishable after the
fact - the boot banner is gone as soon as the log ring turns over.

Platforms that know report it: ESP32 maps esp_reset_reason(). Linux returns
null, because the supervisor relaunches the process and the reason it stopped
is in the supervisor's log rather than anything the new process can read; the
line is omitted when there is nothing to say.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant