79

You can use the BCM2708's hardware watchdog. To use it begin by loading the module: sudo modprobe bcm2708_wdog Then edit the /etc/modules file: sudo nano /etc/modules and add the following line: bcm2708_wdog Next you will need to setup the watchdog daemon. Install and confiigure it to start on bootup: sudo apt-get install watchdog chkconfig ...


7

how i can load Module bcm2708_wdog At first I thought you were looking for the wrong thing because of this: Linux raspberrypi 4.4.7-v7+ ^^^ Since this means you are using a Pi 2 or 3, parts for which are sometimes referred to as "2709" instead of "2708". However, as far as I can tell, the watchdog module has the same name for both ...


7

You can and it's quite easy. RPi has a Linux module that implements the standard Linux watchdog API. You can find documentation of this here. Now, if you read this, you will know that there is a special device file called /dev/watchdog and in order to use watchdog you have to open this file and write some data (one byte, it's best to write something other ...


6

This answer is not specific to the raspberry pi, but is general advice for remote administered servers. ssh. Using secure shell is almost as good as being there. serial console and out of band administration: if you screw up your network interface having a second way to login is a lifesaver. a simple way would be to have a Identical backup machine running ...


6

For your system-level watchdog, I was going to suggest building a hardware watchdog. There are connections on the RPi board (the P6 header) which you can short to reset the device. You could connect this to a countdown timer chip, and have your app regularly use the GPIO pins to reset the timer. If your app stopped working for too long, the countdown would ...


6

It is very easy to wire a hardware reset to the Rpi3. Here is where you will find holes already open and waiting: (Shown here with header pins soldered in place directly above the screw hole) Don't use too much heat or solder. A little bit will do. It is delicate underneath, with a thin trace. I leave them just open, and use the green wire to briefly ...


6

As mentioned in the question edit the rev 2.0 boards now have a specific reset header labelled P6 which is positioned in between the HDMI connector and micro-USB port. The header consists of just two holes (into which one could solder a header/pins). To reset the PI you just momentarily connect the two pins.


6

sudo poweroff means shut down and stay off. The watchdog does not, and should not, intercept this. The behaviour you are experiencing is correct and you should not expect the watchdog to restart a powered-off system. I don't think this is what you are wanting to do though. If you want to restart the pi. you should use the command sudo reboot instead. And in ...


5

I spent a bit of time getting the watchdog working on a Debian Stretch version of Raspbian: pi@orangepi:~ $ cat /etc/rpi-issue Raspberry Pi reference 2018-11-13 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7e0c786c641ba15990b5662f092c106beed40c9f, stage2 pi@orangepi:~ $ uname -a Linux orangepi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT ...


5

a) for a effective forkbomb you need to disable the swap partition. (swapoff -a) b) the system may survive a single forkbomb. Simply start a number of them. A very simply test can be done by killing the watchdog process. By doing so the watchdog process doesn't ping the watchdog device, so the hardware watchdog will reboot the pi. In a realworld situation ...


5

I didn't wade through all the rant you linked, but the author doesn't seem to understand the watchdog. There is a BCM hardware watchdog; If you want to start the hardware watchdog include dtparam=watchdog=on in /boot/config.txt In and of itself this does little, although it should restart the system if not "kicked" regularly. You can write code which opens ...


4

I have a theory of why system is not rebooting, but not yet tested. in /etc/watchdog.conf there are lines: realtime = yes priority = 1 basically what I am thinking is that the forkbomb runs but at a lower priority than 1. WatchDog Daemon is still able to get the pulses to the hardware WatchDog. System is still running pretty inoperable, but because ...


4

Ok, after some testing it seems like the watchdog module is loaded by default. To check for yourself, see if /dev/watchdog exists. This is the guide what worked for me.


3

I was facing a very similar situation. I ended up not using ping but curl. because many times, ping will still work even though the mobile 3G/4G connection has run out of credits/data -- while accessing the web is blocked. On some networks, ping does never work (because ICMP protocol is blocked). In any case, ping is not a reliable way for testing internet ...


3

Over at Unix & Linux Ineb answered: Open /lib/systemd/system/watchdog.service and add [Install] WantedBy=multi-user.target Systemd needs the [Install]-Section for a Unit to know how it should enable/disable the Unit. After that calling systemctl enable watchdog worked.


3

The monit tool is good for monitoring and restarting services. If you are using a Debian based distribution then it should be in the package repository that your Raspberry Pi is using. See the main Debian monit packages for links to some useful information about monit but you will need to download from you R-Pi repository. If you have created init.d ...


3

I think temperature-device option should be used in watchdog config file for Raspbian (8.0) instead of temperature-sensor. There is an old watchdog version which supports temperature-device option version only. See: http://www.sat.dundee.ac.uk/psc/watchdog/watchdog-configure.html#Temperature_Sensors My /etc/watchdog.conf file - temperature part temperature-...


3

The latest Raspbian has the GPU temperature output at this command /opt/vc/bin/vcgencmd measure_temp and has a result of... temp=49.2'C But the system also has the CPU temp- I am not sure if they are different sensors or the same but they output slightly different values. /sys/class/thermal/thermal_zone0/temp Install watchdog sudo apt-get install ...


3

Update. This package was moved from the upstream of the Arch Repo over to the AUR and no one has produced an ARM version so the watchdog package is no longer available via pacman. The sources are available alongside the systemd unit files so you could try compiling it yourself (note the issues tagged on the package page) and enabling the service via the ...


3

Do NOT attempt to load ANY modules. Add dtparam=watchdog=on to config.txt and Device Tree will load the module. NOTE you also need to enable the watchdog service. See https://raspberrypi.stackexchange.com/a/68332/8697


3

Watchdog is built into the Raspbian kernel using CONFIG_WATCHDOG=y in kernel parameters, so rmmod is not possible unless you rebuild the kernel. /proc/sys/kernel/watchdog is not implemented in Raspbian either. I'm not sure about Arch, but judging by your question the situation there is similar. You don't need GRUB to pass parameters to the kernel: on ...


2

I had the same experience when running the fork-bomb - the system become unstable - and kicked me off my ssh session - but the pi didn't reboot. I got it to work (at least once) however - by running the fork-bomb as root. $ sudo su - # swapoff -a # :(){ :|:& };:


2

There is no way, without a separate circuit or device to have the RPi wake itself up. You could bridge the pins on P6 Header using an Arduino or similar, or a physical switch or jumper on those same pins, or cut power and re-energize the system, but you can't have the RPi power itself on.


2

1. Reset The Pi 2 has a reset pin. According to this article it's a two pin header (unpopulated holes only) located between the display socket and the ACT LED. Supposedly, it's also labeled "RUN". Shorting these pins pulls an input pin of the BCM low, and thus resetting it. So, to emulate this with the Arduino, it's only necessary to figure out which of ...


2

It's pretty clear about there being no /dev/watchdog. You may have to manually load the driver. Try: sudo modprobe bcm2708_wdog sudo modprobe bcm2835_wdt And see if /dev/watchdog now exists. If it doesn't, or there are errors, immediately check tail -n 25 /var/log/syslog and/or journalctl -xn 25 to see if there is any explanation. You can also double ...


2

Power is a system service/daemon in pi and is string parsed by an IC directly pin out/fanouted to the Broadcom IC. Operation workflow can be altered by referring to system files but from what I can tell you are trying to invoke periperhials in custom power regulation scenarios within the concept of interrupts and watchdog timers. You can alter some portion ...


2

Indeed in Pi3 using stretch (and even jessie) the hardware watchdog is enabled by default


2

Here is a small bash script that you can call with cron, for example every 30 seconds. #!/bin/bash COUNT=3 INTERVAL=1 for ((i=COUNT; i>0; i--)); do /bin/ping -c1 -n 8.8.8.8 >/dev/null 2>&1 [ $? -eq 0 ] && exit 0 sleep $INTERVAL done /sbin/reboot This will look $COUNT times if ping returns without error. If so the script ...


1

You can use the nano tool by executing: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf All you need to do is add your networks with the following format with id_str= and a familiar name. ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="Network1" psk="password1" id_str="kitchen" } network={ ssid="...


Only top voted, non community-wiki answers of a minimum length are eligible