FYI: shell script to show SABnzbd's Queue and History

Support for the Debian/Ubuntu package, created by JCFP.
Forum rules
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.
Post Reply
User avatar
sander
Release Testers
Release Testers
Posts: 8812
Joined: January 22nd, 2008, 2:22 pm

FYI: shell script to show SABnzbd's Queue and History

Post by sander »

If you only have terminal / SSH access to a system running SABnzbd, here's a script to show SABnzbd's Queue and History

Code: Select all

#!/bin/sh
# Show SABnzbd's Queue and History, from the commandline
# Get the api-key
APIKEY=`awk ' /^api_key/ { print $NF }' ~/.sabnzbd/sabnzbd.ini`
echo $APIKEY
echo "QUEUE:"
lynx --dump "http://127.0.0.1:8080/api?output=json&apikey=$APIKEY&mode=queue" | python3 -m json.tool  | grep -i filename
echo "HISTORY:"
lynx --dump "http://127.0.0.1:8080/api?output=json&apikey=$APIKEY&mode=history" | python3 -m json.tool | grep -i -e nzb_name -e status
tagwolf
Newbie
Newbie
Posts: 10
Joined: April 8th, 2023, 11:56 pm

Re: FYI: shell script to show SABnzbd's Queue and History

Post by tagwolf »

Whoa I haven't seen lynx used in a long time. That brings me back :).
Post Reply