Book Image

Raspberry Pi Server Essentials

By : Piotr J Kula
Book Image

Raspberry Pi Server Essentials

By: Piotr J Kula

Overview of this book

Table of Contents (16 chapters)
Raspberry Pi Server Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Hardware watchdog


A hardware watchdog is a digital clock that needs to be regularly restarted before it reaches a certain time.

In the TV series Lost, there is a dead man's switch hidden on the island that needs to be pressed at regular intervals; otherwise, an unprecedented event will begin. In terms of the Broadcom GPU, if the switch is not pressed, it means that the system has stopped responding; the reaction event is to restart the Raspberry and reload the operating system.

Raspbian has a kernel module included that is disabled by default and deals with the watchdog hardware. A configurable daemon runs on the software layer that sends regular events (like pressing a button), referred to as a heartbeat to the watchdog, via the kernel module.

Enabling the watchdog and daemon

To get everything up and running, we need to do a few things in the console as follows:

sudo modprobe bcm2708_wdog
sudo vi /etc/modules

Add the line of text bcm2708_wdog to the file, then save and exit.

Next, we need to...