The only problem is that I can't get the watchdog package to email or to log.
I'm trying this on a Model B 3+ :
Here are the relevant details in /etc/watchdog.confLinux raspi-cam 4.19.42-v7+ #1219 SMP Tue May 14 21:20:58 BST 2019 armv7l GNU/Linux
Code: Select all
# ping the Utility ESP8266 ping = 192.168.1.2 # ping the router ping = 192.168.1.1 interface = wlan0 max-load-1 = 24 #max-load-5 = 18 #max-load-15 = 12 min-memory = 1 retry-timeout = 60 repair-maximum = 1 watchdog-device = /dev/watchdog # requirement for RPi's is <=15, otherwise default is 60 seconds watchdog-timeout = 15 admin = [email protected] #interval = 14 logtick = 4 log-dir = /var/log/watchdog # This greatly decreases the chance that watchdog won't be scheduled before # your machine is really loaded realtime = yes priority = 1
In /etc/default/watchdog I added:
Code: Select all
I also configured the ssmtp mailer.
Here are the entries in /etc/ssmtp/ssmtp.conf:
Code: Select all
# # Config file for sSMTP sendmail # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. #root=postmaster [email protected] # The place where the mail goes. The actual machine name is required no # MX records are consulted. Commonly mailhosts are named mail.domain.com #mailhub=mail mailhub=smtp.gmail.com:587 # Where will the mail seem to come from? #rewriteDomain= # The full hostname hostname=raspi-cam # Are users allowed to set their own From: address? # YES - Allow the user to specify their own From: address # NO - Use the system generated From: address FromLineOverride=YES AuthUser=gmail-account.com AuthPass=Gmail-account-password UseSTARTTLS=YES UseTLS=YES
Here are the logs for the shell test mail (at 21:53) and the cron test (at 22:00) and then the watchdog error message at 22:03:
Jul 9 21:53:06 localhost sSMTP: Creating SSL connection to host
Jul 9 21:53:06 localhost sSMTP: SSL connection using RSA_AES_128_CBC_SHA1
Jul 9 21:53:08 localhost sSMTP: Sent mail for [email protected] (221 2.0.0 closing connection d1sm11186084wrs.94 - gsmtp) uid=1000 username=pi outbytes=399
Jul 9 22:00:01 localhost sSMTP: Creating SSL connection to host
Jul 9 22:00:02 localhost sSMTP: SSL connection using RSA_AES_128_CBC_SHA1
Jul 9 22:00:03 localhost sSMTP: Sent mail for [email protected] (221 2.0.0 closing connection g12sm5558868wrv.9 - gsmtp) uid=0 username=root outbytes=663
Jul 9 22:03:03 localhost sSMTP: Unable to locate smtp.gmail.com
Jul 9 22:03:03 localhost sSMTP: Cannot open smtp.gmail.com:587
Here are the relevant lines in /etc/alternatives:
I'm at a total loss why the mail program works with the shell test and cron and not with the watchdog package.lrwxrwxrwx 1 root root 23 Jul 8 11:11 mail -> /usr/bin/mail.mailutils*
lrwxrwxrwx 1 root root 39 Jul 8 11:11 mail.1.gz -> /usr/share/man/man1/mail.mailutils.1.gz
lrwxrwxrwx 1 root root 23 Jul 8 11:11 mailx -> /usr/bin/mail.mailutils*
lrwxrwxrwx 1 root root 39 Jul 8 11:11 mailx.1.gz -> /usr/share/man/man1/mail.mailutils.1.gz
lrwxrwxrwx 1 root root 27 Jul 8 11:11 messages -> /usr/bin/messages.mailutils*
lrwxrwxrwx 1 root root 43 Jul 8 11:11 messages.1.gz -> /usr/share/man/man1/messages.mailutils.1.gz
lrwxrwxrwx 1 root root 27 Jul 8 11:11 movemail -> /usr/bin/movemail.mailutils*
lrwxrwxrwx 1 root root 43 Jul 8 11:11 movemail.1.gz -> /usr/share/man/man1/movemail.mailutils.1.gz
The /var/log/watchdog directory stays empty, I can't get any logs recorded either.
I searched high and low on the internet, no help or clues.
Is there something I can do to make the watchdog package work?