Auto Restart feature

701 views
Skip to first unread message

Austin Hruskach

unread,
Aug 18, 2022, 1:19:23 PM8/18/22
to sdrtrunk
When SDRTrunk crashes for any reason, I wish there was a super simple way to restart automatically without human interaction. Im struggling to find other solutions because SDRTrunk doesn't close upon crash, but the decoders stop, thus making it difficult to make a script to restart it. I rely on 15 minute updates from broadcastify to notify me of an outage.

Brad Wicks

unread,
Aug 19, 2022, 12:53:50 AM8/19/22
to sdrtrunk

I'm running 5 Noolec SDRs (w/ heatsink & fan cooling) on my 16 core Ryzen. And often after a while when SDRT crashes, it does so hard the I have to un/re plug my SDRs or SDRT can't even restart successfully.

Nathaniel Bland

unread,
Aug 19, 2022, 4:13:01 PM8/19/22
to sdrtrunk
Here is my solution incase someone needs it. I replied yesterday, but forgot to include the group.

In Windows, I use a simple command line monitor called "supervisor". It will start the program and watch to see if it crashes and restart. https://github.com/chebum/Supervisor

I created a batch file to run this and placed it in windows startup folder via running the command (Win Key+R) "Shell:common startup" or browse to "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup". To run it for your user the run command is "Shell: startup" and opens "C:\Users\[USERNAME]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup". Restart your computer and it should run that batch file, and thus the program(s) on launch.

I use the batch file in the SDRT bin folder. Here's my command (note, the sdr-trunk folder is on the desktop of this server and the supervisor executable is on the desktop along with this batch file.):

.\supervisor "C:\Users\Radio\Desktop\sdr-trunk-windows-x86_64-v0.5.0-beta5\bin\sdr-trunk.bat"

There are other solutions, but this is what I use in my setup and has been working well for me.

On Thu, Aug 18, 2022, 11:19 AM Austin Hruskach <hrus...@gmail.com> wrote:
When SDRTrunk crashes for any reason, I wish there was a super simple way to restart automatically without human interaction. Im struggling to find other solutions because SDRTrunk doesn't close upon crash, but the decoders stop, thus making it difficult to make a script to restart it. I rely on 15 minute updates from broadcastify to notify me of an outage.

--
You received this message because you are subscribed to the Google Groups "sdrtrunk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sdrtrunk+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sdrtrunk/7027eb66-16c5-4a64-b2f3-7671d96b218en%40googlegroups.com.

Austin Hruskach

unread,
Aug 24, 2022, 8:52:01 AM8/24/22
to sdrtrunk
It didn't quite work the way I wanted it to. It wouldnt restart the program since the program remains open during an error.

Austin Hruskach

unread,
Nov 1, 2022, 12:48:31 PM11/1/22
to sdrtrunk
I am still interested in finding a way to restart SDRTrunk after a tuner goes offline or stops decoding. As previously mentioned in this thread, A script can monitor the program itself to see if its running and perform a restart if necessary. But, here's the important part, SDRTrunk program technically still runs even when it stops decoding my control channel. So there is no real way to know if SDRTrunk is actively decoding unless you see it on screen. Otherwise an idle tuner wouldn't trigger the program to close.

Is there a way to add a flag to the .bat file to restart the program when a tuner is idle for X amount of seconds? or could a feature like this be implimented?

Jim Kovalsky

unread,
Nov 1, 2022, 1:03:21 PM11/1/22
to sdrtrunk
I would second this request.  It's rather common that for reasons unknown SDRTrunk will just stop decoding calls...  The tuner will drop to idle...  In my environment if the control channel is idle for more than a minute there is DEFINITELY a problem.  Until I can exit/restart SDRTrunk I've lost the recordings.  
I will say that Beta 4 and 5 are more reliable, but the audio gets clipped so much I have to still use Beta 2.  That being said, adding the feature is desirable, but without resolving the audio clipping I still won't be able to use it.

Austin Hruskach

unread,
Nov 27, 2022, 3:22:59 PM11/27/22
to sdrtrunk
My best idea so far is to monitor a directory for call event logs and run a script to restart SDRTrunk if a call event log is not detected in X seconds.

tv...@tvsjr.com

unread,
Nov 27, 2022, 3:51:09 PM11/27/22
to Austin Hruskach, sdrtrunk
It would be interesting to know the cause of the failure. I'm monitoring more than 20 systems with 3 Airspys and running everything into Trunking Recorder which currently has more than 7 million calls logged. This is admittedly on a high-spec 32-core Ryzen box. I've never had a failure, running for more than a month 24/7. Are you running too much, running RTLs, etc? 




From: Austin Hruskach <hrus...@gmail.com>
Sent: Sunday, November 27, 2022 14:23
To: sdrtrunk
Subject: Re: Auto Restart feature

Douglas Graham

unread,
Mar 14, 2023, 2:23:11 AM3/14/23
to sdrtrunk
It would be nice to have some sort of watchdog to restart the app on error, but I have had a few occasions where audio stopped, but there was no crash/log data on the command line screen. I'm using Windows Task Scheduler to try something. I have 4 channels set up for auto start, running on 8 RTL-SDR radios. I have Task Scheduler set to start the app via the batch file with a 1 minute delay after I logon. From there I have  a Task Scheduler Trigger set to stop the program after it's been running for 1 hour and restart it.  Most of my issues come at completely random times - sometimes it works fine for less than an hour, sometimes it works fine for 6 hours.  This doesn't solve the issue (and I realize I will lose recordings for about 20 seconds per hour) , but I'm hopeful it might be a good workaround for now.

Austin Hruskach

unread,
Mar 22, 2023, 10:19:37 AM3/22/23
to sdrtrunk
I'm running 4 x RTL-SDR V3 and 1 x Airspy R2. My CPU and RAM Usage never exceeds 40%

On Sunday, November 27, 2022 at 3:51:09 PM UTC-5 tvsjr wrote:
Message has been deleted
Message has been deleted

Steve Hanis

unread,
Jan 10, 2024, 5:18:56 PM1/10/24
to sdrtrunk
Just kill and restart SDRT on a fixed time interval, like every 6 hrs.

doctorwizz1

unread,
Jan 11, 2024, 8:03:50 AM1/11/24
to sdrtrunk
Just use AlwaysUp. Tons of options to kill and restart programs.

Dan G

unread,
Jan 12, 2024, 8:07:09 PM1/12/24
to sdrtrunk
Has anyone tested AlwaysUp with SDRTrunk? It does seem to be a useful tool but when SDRTrunk crashes for me it doesn't actually crash the software but rather the communication between SDRTrunk and the dongles which stops all the streaming.
Reply all
Reply to author
Forward
0 new messages