well, from what I have found:
/etc/network/interfaces, ifup/ifdown, the "hotplug" keyword are all obsolete . Even in Jessie.
What you want is the modern way of configuring network interfaces, which is event-driven: when an interface is brought up, an event is fired and dhcpcd configures networking (see /etc/dhcpcd.conf). When an interface disappears, an event is fired and dhcpcd deconfigures networking.
In a sense, it is all "hotplug" by default now.
Forget the old commands "ifup wlan0" / "ifdown wlan0".
Instead get in the habit of using "ifconfig wlan0 up" / "ifconfig wlan0 dow
Somewhere I was also shown a newer way of setting up the WLAN( )
Originally if the WAP went down/up the RPZ would just not reconnect.
The way I was told (in another thread with a whole new way of setting up the WLAN( ) )
is supposed to be compatible with the WAP going down/up and reconnecting.
I'm wanting to add flows to monitor what is going no.
If the WAP goes down, on the RPZ it logs the event ASAP.
Then if the WAP comes back up (which may not be known to the RPZ) I want the RPZ to be looking for the WAP.
If the WAP is there, it connects.
If it isn't, it reboots. Just to be sure.
It looks for the WAP. (Repeat above a couple of times)
Once it has done this a few times (say 3 - like I think I said earlier) it stops doing that and logs this fact also.
Then it is up to me to note this event.
No, I can't say if it is a WiFi problem. But if it detects the WiFi down, it tries to get it back up.
If a Kernel Panic sets in, I have a watchdog running that I hope will reboot the machine.
Yes, I shall have to look at the log file.
Here's what I see:
pi@TelePi:~ $ ls -l /var/log/syslog*
-rw-r----- 1 root adm 3665 Jan 17 21:00 /var/log/syslog
-rw-r----- 1 root adm 70678 Jan 17 06:25 /var/log/syslog.1
-rw-r----- 1 root adm 1170 Jan 16 06:25 /var/log/syslog.2.gz
-rw-r----- 1 root adm 1112 Jan 15 06:25 /var/log/syslog.3.gz
-rw-r----- 1 root adm 2116 Jan 14 06:25 /var/log/syslog.4.gz
-rw-r----- 1 root adm 1187 Jan 13 06:25 /var/log/syslog.5.gz
-rw-r----- 1 root adm 1215 Jan 12 06:25 /var/log/syslog.6.gz
-rw-r----- 1 root adm 15450 Jan 11 06:25 /var/log/syslog.7.gz
pi@TelePi:~ $ usb
pi@TelePi:/media/pi/9020-9C27 $ cd logs
pi@TelePi:/media/pi/9020-9C27/logs $ lf
last_alive.db
Rebooted at 2019-12-23T234534.db
Rebooted at 2019-12-29T221036.db
Rebooted at 2019-12-30T221932.db
Rebooted at 2020-01-09T033921.db
Rebooted at 2020-01-09T034400.db
Rebooted at 2020-01-09T201957.db
Rebooted at 2020-01-12T200053.db
Rebooted at 2020-01-16T045928.db
pi@TelePi:/media/pi/9020-9C27/logs $ cd ~
So the machine was rebooted 16 Jan. at T04:59:28
Alas that seems to be in syslog.2.gz
From the file:
Jan 16 00:05:22 TelePi wpa_supplicant[316]: wlan0: WPA: Group rekeying completed with 24:f5:a2:b2:2a:07 [GTK=CCMP]
Jan 16 00:17:01 TelePi CRON[25137]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 16 00:46:11 TelePi systemd[1]: Starting Daily apt download activities...
Jan 16 00:46:19 TelePi systemd[1]: Started Daily apt download activities.
Jan 16 00:46:19 TelePi systemd[1]: apt-daily.timer: Adding 28min 39.461111s random time.
Jan 16 00:46:19 TelePi systemd[1]: apt-daily.timer: Adding 6h 6min 20.488228s random time.
Jan 16 01:05:22 TelePi wpa_supplicant[316]: wlan0: WPA: Group rekeying completed with 24:f5:a2:b2:2a:07 [GTK=CCMP]
Jan 16 01:17:01 TelePi CRON[31252]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 16 02:05:22 TelePi wpa_supplicant[316]: wlan0: WPA: Group rekeying completed with 24:f5:a2:b2:2a:07 [GTK=CCMP]
Jan 16 02:17:01 TelePi CRON[4966]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 16 02:57:27 TelePi systemd[1]: Starting Certbot...
Jan 16 02:58:06 TelePi systemd[1]: Started Certbot.
Jan 16 02:58:06 TelePi systemd[1]: certbot.timer: Adding 3h 18min 54.543480s random time.
Jan 16 02:58:06 TelePi systemd[1]: certbot.timer: Adding 11h 21min 46.836520s random time.
Jan 16 03:05:22 TelePi wpa_supplicant[316]: wlan0: WPA: Group rekeying completed with 24:f5:a2:b2:2a:07 [GTK=CCMP]
Jan 16 03:17:01 TelePi CRON[11045]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 16 04:05:22 TelePi wpa_supplicant[316]: wlan0: WPA: Group rekeying completed with 24:f5:a2:b2:2a:07 [GTK=CCMP]
Jan 16 04:17:01 TelePi CRON[17131]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 16 05:05:22 TelePi wpa_supplicant[316]: wlan0: WPA: Group rekeying completed with 24:f5:a2:b2:2a:07 [GTK=CCMP]
Jan 16 05:17:01 TelePi CRON[23201]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 16 06:05:22 TelePi wpa_supplicant[316]: wlan0: WPA: Group rekeying completed with 24:f5:a2:b2:2a:07 [GTK=CCMP]
Jan 16 06:17:01 TelePi CRON[29254]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 16 06:25:02 TelePi CRON[30076]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ))
Jan 16 06:25:09 TelePi systemd[1]: Stopping Make remote CUPS printers available locally...
Jan 16 06:25:09 TelePi systemd[1]: Stopped Make remote CUPS printers available locally.
Jan 16 06:25:09 TelePi systemd[1]: Stopping CUPS Scheduler...
Jan 16 06:25:09 TelePi systemd[1]: Stopped CUPS Scheduler.
Jan 16 06:25:09 TelePi systemd[1]: Stopped CUPS Scheduler.
Jan 16 06:25:09 TelePi systemd[1]: Stopping CUPS Scheduler.
Jan 16 06:25:09 TelePi systemd[1]: Started CUPS Scheduler.
Jan 16 06:25:09 TelePi systemd[1]: Closed CUPS Scheduler.
Jan 16 06:25:09 TelePi systemd[1]: Stopping CUPS Scheduler.
Jan 16 06:25:09 TelePi systemd[1]: Listening on CUPS Scheduler.
Jan 16 06:25:09 TelePi systemd[1]: Started CUPS Scheduler.
Jan 16 06:25:09 TelePi systemd[1]: Started Make remote CUPS printers available locally.
Jan 16 06:25:11 TelePi liblogging-stdlog: [origin software="rsyslogd" swVersion="8.24.0" x-pid="206" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Because the time in the "Rebooted at" file is Zulu
I'm not exactly sure when it happened.
I'm guessing 15:59 local.
But keeping to Zulu
time, 04:59..... It is weird.
I can't corralate what is going on.
Every 20 seconds it writes a time stamp to the file: Last alive
.
On bootup, it moves Last alive
to Rebooted at.......
with the time stamp.
But it doesn't make sense.
Rebooted at says 04:59.xx 16 Jan.
Taking the times on the syslog are are also Zulu
they go beyond 04:59.xx
I'm confused in what I am seeing.