DCDi
Posts: 15
Joined: Mon Dec 22, 2014 2:45 pm

Watchdog for Pi2

Tue Feb 17, 2015 1:34 pm

Hi,

Are these steps still the same for watchdog on Pi2? Must be wrong....

Code: Select all

sudo apt-get install watchdog
sudo modprobe bcm2708_wdog
sudo vi /etc/modules
---
bcm2708_wdog
---
sudo update-rc.d watchdog defaults
sudo vi /etc/watchdog.conf
---
#uncomment the following:
max-load-1
watchdog-device
---
sudo service watchdog start
I am looking to do a reboot if it locks up... is there a better / easier way?

Thanks in advance.

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Watchdog for Pi2

Tue Feb 17, 2015 2:10 pm

I often wondered how a software daemon would respond if the Pi actually crashed, because surely the daemon would die with it ?
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: Watchdog for Pi2

Tue Feb 17, 2015 2:18 pm

DCDi wrote:Hi,

Are these steps still the same for watchdog on Pi2? Must be wrong....

Code: Select all

sudo apt-get install watchdog
sudo modprobe bcm2708_wdog
sudo vi /etc/modules
---
bcm2708_wdog
---
sudo update-rc.d watchdog defaults
sudo vi /etc/watchdog.conf
---
#uncomment the following:
max-load-1
watchdog-device
---
sudo service watchdog start
I am looking to do a reboot if it locks up... is there a better / easier way?

Thanks in advance.
It is exactly the same watchdog block.(identical HW-side)

DCDi
Posts: 15
Joined: Mon Dec 22, 2014 2:45 pm

Re: Watchdog for Pi2

Tue Feb 17, 2015 2:36 pm

@ mimi - so that works for you on pi2?

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: Watchdog for Pi2

Tue Feb 17, 2015 2:51 pm

DCDi wrote:@ mimi - so that works for you on pi2?
I did not run Linux yet.(it works the same bare-metal side)

3corey2
Posts: 85
Joined: Sun Feb 15, 2015 2:59 am

Re: Watchdog for Pi2

Tue Feb 17, 2015 3:20 pm

it should, it looks right to me.
ras pi 2, gotta love it.

User avatar
rpdom
Posts: 14742
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Watchdog for Pi2

Tue Feb 17, 2015 8:28 pm

pluggy wrote:I often wondered how a software daemon would respond if the Pi actually crashed, because surely the daemon would die with it ?
The software sets up the hardware watchdog, then kicks it every now and then to say it is still alive. If it misses a kick the hardware doggie barks ;)

JayTay79
Posts: 4
Joined: Mon Feb 16, 2015 10:21 pm

Re: Watchdog for Pi2

Tue Feb 17, 2015 8:38 pm

I have watchdog working fine on my Pi 2.

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: Watchdog for Pi2

Tue Feb 17, 2015 8:51 pm

rpdom wrote:
pluggy wrote:I often wondered how a software daemon would respond if the Pi actually crashed, because surely the daemon would die with it ?
The software sets up the hardware watchdog, then kicks it every now and then to say it is still alive. If it misses a kick the hardware doggie barks ;)
Curiously, the Pi resets after the Xenon Death Flash if you enabled the watchdog.

User avatar
electronicsguy
Posts: 156
Joined: Wed Jan 21, 2015 11:20 pm
Contact: Website

Re: Watchdog for Pi2

Tue Feb 17, 2015 8:55 pm

rpdom wrote:
pluggy wrote:I often wondered how a software daemon would respond if the Pi actually crashed, because surely the daemon would die with it ?
The software sets up the hardware watchdog, then kicks it every now and then to say it is still alive. If it misses a kick the hardware doggie barks ;)
Is there a way to test it, by forcing a stall execution on the RPi?
blog: https://electronicsguy.wordpress.com
github: https://github.com/electronicsguy

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: Watchdog for Pi2

Tue Feb 17, 2015 8:58 pm

electronicsguy wrote:
rpdom wrote:
pluggy wrote:I often wondered how a software daemon would respond if the Pi actually crashed, because surely the daemon would die with it ?
The software sets up the hardware watchdog, then kicks it every now and then to say it is still alive. If it misses a kick the hardware doggie barks ;)
Is there a way to test it, by forcing a stall execution on the RPi?
Xenon Death Flash is a reliable way.
DISCLAIMER: I'm not responsible if your Pi won't boot anymore

User avatar
electronicsguy
Posts: 156
Joined: Wed Jan 21, 2015 11:20 pm
Contact: Website

Re: Watchdog for Pi2

Thu Feb 19, 2015 7:07 am

haha sure. but a more scientific way for RPi's of the future that may have a better designed chip? any specific command that we can use?
blog: https://electronicsguy.wordpress.com
github: https://github.com/electronicsguy

Aydan
Posts: 677
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, near Lake Constance

Re: Watchdog for Pi2

Thu Feb 19, 2015 3:46 pm

electronicsguy wrote:haha sure. but a more scientific way for RPi's of the future that may have a better designed chip? any specific command that we can use?
Kill the watchdog daemon and it will stop kicking the watchdog and thus reset the Pi.

Regards
Aydan

rao
Posts: 1
Joined: Mon Mar 07, 2016 5:51 pm

Re: Watchdog for Pi2

Sun Apr 10, 2016 5:52 pm

Hello
I am running a shell script on startup. My program hangs after sometime. Sometimes it hangs after 6-12 hours or sometimes after 2-3 days. But my PI works fine but only the program freezes when I hard reboot the PI the program works fine but as mentioned above only for 6-12 hours or sometimes for 2-3 days. Now kindly me how to setup watchdog for the shell script running on startup.
Regards
Rao Ali

Return to “General discussion”