Hello.
The API docs show how to set the speedlimit and I've been using this for a long time to automatically restrict the download speeds when other things on my LAN require more bandwidth, but my current method is quite 'dumb'. It just keeps enforcing preset limits without knowing if it needs to - it can't check to see if SABnzbd is already speed-limited.
Is there a way (other than getting the full queue output via the API) to check if SABnzbd is currently using a speedlimit? Some file I can check? It seems this is not recorded in the .ini file for SABnzbd.
Thank you.
[SOLVED] CLI check if speedlimit has been set?
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
[SOLVED] CLI check if speedlimit has been set?
Last edited by OneCD on December 22nd, 2017, 8:22 pm, edited 1 time in total.
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
Re: CLI check if speedlimit has been set?
Hmmm, I think the API method is the only way!
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Re: CLI check if speedlimit has been set?
Okiedoke. Thanks @safihre.
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
Re: CLI check if speedlimit has been set?
Just a quick follow-up here. I checked out the API queue method and had this working in about 2 minutes:
This is exactly what I'm after.
Code: Select all
$ curl -s 'http://127.0.0.1:8800/sabnzbd/api?mode=queue&apikey=<my key>&output=json' | jq -r '.queue.speedlimit'
55.3
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
Re: [SOLVED] CLI check if speedlimit has been set?
Nice. Never heard of that command to parse json!
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Re: [SOLVED] CLI check if speedlimit has been set?
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE