Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Protip: hardware watchdog
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 2384

PostPosted: Sun Sep 04, 2022 3:01 pm    Post subject: Protip: hardware watchdog Reply with quote

So, I've recently stumbled upon this underappreciated thing and I though someone here might find it handy:
Some arm boards come equipped with a hardware watchdog.
One notable example would be rpi4b, which I imagine is quite popular by now. I don't know about earlier versions, but if you have them, you might want to check.

Enabling hardware watchdog takes 3 steps:
1) kernel support for the available watchdog chip
2) opening /dev/watchdog to start the reset timer (closing it may or may not stop the timer, depending on kernel's config)
3) repeatedly writing to /dev/watchdog to reset the reset timer

Step 2 and 3 should probably be taken care of by a dedicated service (like, you know, "watchdog" for example). Systemd's pid 1 can also be configured to do that via variables in /etc/systemd/system.conf

I know I'm not the only one who experienced crashes, and sometimes small arm boards are used in remote locations making resetting them quite a hassle. While watchdog is obviously inferior to stuff not crashing in the first place, it can be a pretty good workaround.
Also, my rpi seems to have stopped crashing since I enabled watchdog. I knew computers can sense fear when the user is in a hurry, but now I have another point showing they can be successfully threatened into working too :lol:

Alright, folks, that's it for today.
GL&HF
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum