Quantcast
Viewing all articles
Browse latest Browse all 3790

Troubleshooting • Crontab reboot Pi 4 - odd behaviour

Hi All,
i'm using a Pi 4 with a PiSDR image (for more details see https://github.com/luigifcruz/pisdr-image ). I'm running some code to collect data from an attached SDR. The code runs fine and collects what I need, but i've been experiencing a connection drop out to the SDR after several days (this is a long term project and i'm hoping to run this semi-permanently). I have suspected that it might be due to some kind of memory leak, which i've sort of checked out through looking at the memory usage over time. This does seem to creep up.
Anyway, in order to get round this i've built in a reboot every so often to reset everything. I'm using crontab to set things up and i have the following commands.

Code:

sudo crontab -e
and within the crontab file i have

Code:

* */7 * * * /sbin/shutdown -r now
I've also got another crontab line that restarts the code.
So, initial tests looked positive and the reboot happened and the code started up again. I tested it out with a 10 minute interval between reboots. I moved onto 7 hours, again just to test things out. However, i'm getting some odd behaviour when it goes into the reboot. The reboot happens, but a short while later (less than a minute) it reboots again. This can happen for up to half an hour, after which it settles down again and reboots after 7 hours.
Does anyone have any idea as to why this odd behaviour might be taking place?
Thanks

Statistics: Posted by cappers — Wed Jan 24, 2024 2:36 pm



Viewing all articles
Browse latest Browse all 3790

Trending Articles