VecH
Posts: 41
Joined: Tue Dec 09, 2014 5:30 pm

[SOLVED] Raspbian Jessie, how check watchdog ?

Thu Nov 05, 2015 8:05 pm

How check watchdog timer onboard Raspberry PI
fork bomb

Code: Select all

#/bin/python
#fork_bomb.py

import os
 
while True:
      os.fork()
not working, Raspberry PI freezes and not rebooted

this scrypt worked on Raspbian Wheezy
Last edited by VecH on Fri Nov 13, 2015 4:51 pm, edited 1 time in total.

VecH
Posts: 41
Joined: Tue Dec 09, 2014 5:30 pm

Re: Raspbian Jessie, how check watchdog ?

Fri Nov 13, 2015 3:38 am

Please check this forkbomb on Raspbian Jessie with Onboard watchdog

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

Re: Raspbian Jessie, how check watchdog ?

Fri Nov 13, 2015 10:21 am

Do you actually have the watchdog enabled? By default it is not enabled.

VecH
Posts: 41
Joined: Tue Dec 09, 2014 5:30 pm

Re: Raspbian Jessie, how check watchdog ?

Fri Nov 13, 2015 10:45 am

Code: Select all

$ sudo modprobe bcm2708_wdog
$ sudo sh -c "echo 'bcm2708_wdog' >> /etc/modules"
$ sudo apt-get install watchdog chkconfig
$ sudo chkconfig watchdog on
$ sudo service watchdog start
Uncomment two string in file: /etc/watchdog.conf

Code: Select all

$ sudo nano /etc/watchdog.conf
watchdog-device = /dev/watchdog
max-load-1 = 24

Code: Select all

echo "options bcm2708_wdog nowayout=1 heartbeat=13" | sudo tee /etc/modprobe.d/watchdog.conf
$ sudo reboot

$ dmesg | grep watchdog
[   16.012628] bcm2708 watchdog, heartbeat=13 sec (nowayout=1)
Last edited by VecH on Fri Nov 13, 2015 11:48 am, edited 1 time in total.

User avatar
DougieLawson
Posts: 38882
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspbian Jessie, how check watchdog ?

Fri Nov 13, 2015 11:44 am

You need to edit /etc/modules and add

Code: Select all

bcm2708_wdog
to get the kernel module loaded.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

VecH
Posts: 41
Joined: Tue Dec 09, 2014 5:30 pm

Re: Raspbian Jessie, how check watchdog ?

Fri Nov 13, 2015 11:48 am

I forget write in start

Code: Select all

$ sudo modprobe bcm2708_wdog
$ sudo sh -c "echo 'bcm2708_wdog' >> /etc/modules"
Post edited

User avatar
DougieLawson
Posts: 38882
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspbian Jessie, how check watchdog ?

Fri Nov 13, 2015 12:22 pm

I've tested this on both my A+ and my 2B and your fork bomb caused both systems to reboot.

That's with current Jessie and the leading edge 4.1.12+/4.1.12-v7+ #825 kernel (installed with rpi-update).
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

VecH
Posts: 41
Joined: Tue Dec 09, 2014 5:30 pm

Re: Raspbian Jessie, how check watchdog ?

Fri Nov 13, 2015 2:09 pm

You use clear Raspbian Jessie or update from Wheezy ?
If clear install, start script in Jessie not started in boot and config watchdog module in file /etc/default/watchdog

service watchdog does not start when boot
If you manually run all started

How to diagnose?

p.s. I hate systemd


Return to “General discussion”