Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to activate bcm2835_wdt watchdog kernel module for raspberry pi 3?

I have been trying to activate bcm2835_wdt watchdog module of raspberry pi 3 for 6 hours but I couldn't.

modprobe bcm2835_wdt returns no error but lsmod command doesn't return bcm2835_wdt module in the list.

I have loaded watchdog and chkconfig then;

sudo chkconfig watchdog on

when I try to start service

sudo /etc/init.d/watchdog start

I got an error

[....] Starting watchdog (via systemctl): watchdog.service Job for watchdog.service failed because the control process exited with error code.
See "systemctl status watchdog.service" and "journalctl -xe" for details.
 failed!

journalctl -xe  returns;

-- Kernel start-up required 2093448 microseconds.
-- 
-- Initial RAM disk start-up required INITRD_USEC microseconds.
-- 
-- Userspace start-up required 5579375635 microseconds.
Jan 11 16:03:45 al sudo[935]:     root : TTY=pts/1 ; PWD=/ ; USER=root ; COMMAND=/etc/init.d/watchdog start
Jan 11 16:03:45 al sudo[935]: pam_unix(sudo:session): session opened for user root by root(uid=0)
Jan 11 16:03:46 al systemd[1]: Starting watchdog daemon...
-- Subject: Unit watchdog.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit watchdog.service has begun starting up.
Jan 11 16:03:46 al sh[949]: modprobe: **FATAL: Module dcm2835_wdt not found in directory /lib/modules/4.9.59-v7+**
Jan 11 16:03:46 al systemd[1]: watchdog.service: Control process exited, code=exited status=1
Jan 11 16:03:46 al systemd[1]: Failed to start watchdog daemon.
-- Subject: Unit watchdog.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit watchdog.service has failed.

My question is how to enable watchdog kernel module bcm2835_wdt for raspberry pi3 ?

Thank you in advance...

like image 963
user1712451 Avatar asked Jan 11 '18 16:01

user1712451


1 Answers

May the bcm2835_wdt has been compiled into the kernel on your system, so you don't see it with lsmod. Just try:

# cat /lib/modules/$(uname -r)/modules.builtin | grep wdt
kernel/drivers/watchdog/bcm2835_wdt.ko

If you can see it in the list, it has been compiled within the kernel. You may also see if it has been enabled with this:

journalctl --no-pager | grep -i watchdog

Regarding you watchdog configuration, see this error:

modprobe: **FATAL: Module dcm2835_wdt not found in directory /lib/modules/4.9.59-v7+**

The module has been called dcm2835_wdt, not bcm2835_wdt. Also, keep in mind that your watchdog may be used by SystemD, so you should refer to that for using it.

If you don't mind, you may also try a fork bomb to see if the watchdog is able to restart you system when a problem is detected:

python -c "import os, itertools; [os.fork() for i in itertools.count()]"
like image 136
daghemo Avatar answered Nov 10 '22 23:11

daghemo