how to check activity of the sabnzbd app?

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: how to check activity of the sabnzbd app?

Postby jayrock » Wed Aug 31, 2011 12:29 am

Why do you use a different port ????

Regarding API key, a quick Google search - http://www.lmgtfy.com/?q=sabnzbd+api+key+required - reveals this:

http://forums.sabnzbd.org/viewtopic.php?t=1960

So you have to look up the key in the General page of the config. Then add that to the end of the URI, as in the example on

Code: Select all

http://locahost:25914/sabnzbd/api?mode=qstatus&output=xml&apikey=711de66ca57dae90338267d05f70efe9
/jayrock

kikkegek
Posts: 341
Joined: Sun Jul 31, 2011 9:28 am

Re: how to check activity of the sabnzbd app?

Postby kikkegek » Wed Aug 31, 2011 8:29 am

thanks Jayrock, changed the port back to original....I just cant remember 25914...and 23456 is easy....thats why,...


output empty queue:

Code: Select all

<queue> <have_warnings>1</have_warnings> <jobs/> <noofslots>0</noofslots> <paused>False</paused> <pause_int>0</pause_int> <mbleft>0.0</mbleft> <diskspace2>73.236618042</diskspace2> <diskspace1>73.236618042</diskspace1> <speed>0</speed> <timeleft>0:00:00</timeleft> <mb>0.0</mb> <state>IDLE</state> <loadavg>0.99, 1.11, 0.64</loadavg> <kbpersec>0.0</kbpersec> </queue>
output 1 file in queue

Code: Select all

<queue> <have_warnings>1</have_warnings> <jobs> <job> <timeleft>0:32:32</timeleft> <mb>2487.30142689</mb> <msgid/> <filename>aaf-idgop.720p.nfo</filename> <mbleft>2360.36528397</mbleft> <id>SABnzbd_nzo_BdhjEB</id> </job> </jobs> <noofslots>1</noofslots> <paused>False</paused> <pause_int>0</pause_int> <mbleft>2360.36528397</mbleft> <diskspace2>73.2241897583</diskspace2> <diskspace1>73.2241897583</diskspace1> <speed>1.21 M</speed> <timeleft>0:32:32</timeleft> <mb>2487.30142689</mb> <state>DOWNLOADING</state> <loadavg>0.83, 1.01, 0.70</loadavg> <kbpersec>1237.94577767</kbpersec> </queue>
Last edited by kikkegek on Wed Aug 31, 2011 10:45 am, edited 1 time in total.

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: how to check activity of the sabnzbd app?

Postby jayrock » Wed Aug 31, 2011 8:45 am

Thanks - I will get back.

/jayrock

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: how to check activity of the sabnzbd app?

Postby jayrock » Wed Aug 31, 2011 9:43 am

Did some quick hacking. Can you test the following please:

Preparation:
==========
- Log onto your HDA and open a terminal
- Type 'su' to get root access
- Type 'gem install xml-simple'
- 'mkdir some_testing'
- 'cd some_testing'
- Put the attached file into that directory
- Type 'dbus-launch gedit test_sabnzbd.rb'
- Edit line 9 and replace the dummy application key with your key
- Save and close

Testing
==========
- Make sure there is no download
- Run 'ruby test_sabnzbd.rb' and note the ouput
- Repeat with one download ongoing
- Repeat with multiple downloads ongoing
- Do some more happy testing as you like

Please let me know the result.

/jayrock

kikkegek
Posts: 341
Joined: Sun Jul 31, 2011 9:28 am

Re: how to check activity of the sabnzbd app?

Postby kikkegek » Wed Aug 31, 2011 10:46 am

jayrock, I think you didnt attach the file?

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: how to check activity of the sabnzbd app?

Postby jayrock » Wed Aug 31, 2011 11:15 am

Sorry, here it is. The forums do not allow to attach .rb files, so you'll have to unzip it first.

/jayrock
Attachments
test_sabnzbd.zip
(666 Bytes) Downloaded 259 times

kikkegek
Posts: 341
Joined: Sun Jul 31, 2011 9:28 am

Re: how to check activity of the sabnzbd app?

Postby kikkegek » Tue Sep 06, 2011 10:17 pm

no download

Code: Select all

[root@amahi some_testing]# ruby test_sabnzbd.rb data['jobs'][0].size = 0 data['jobs'][0] = {} There are no downloads ongoing. HDA can be suspended. [root@amahi some_testing]#
one download

Code: Select all

[root@amahi some_testing]# ruby test_sabnzbd.rb data['jobs'][0].size = 1 data['jobs'][0] = {"job"=>[{"timeleft"=>["0:04:52"], "id"=>["SABnzbd_nzo_PcepWP"], "msgid"=>[{}], "filename"=>["top.gear.us.s02e07.hdtv.xvid-momentum.nfo"], "mbleft"=>["356.004081726"], "mb"=>["398.396969795"]}]} There are downloads ongoing. HDA shall stay awake. [root@amahi some_testing]#
two downloads, one waiting in queue

Code: Select all

[root@amahi some_testing]# ruby test_sabnzbd.rb data['jobs'][0].size = 1 data['jobs'][0] = {"job"=>[{"timeleft"=>["0:03:27"], "id"=>["SABnzbd_nzo_PcepWP"], "msgid"=>[{}], "filename"=>["top.gear.us.s02e07.hdtv.xvid-momentum.nfo"], "mbleft"=>["258.936079025"], "mb"=>["398.396969795"]}, {"timeleft"=>["0:08:52"], "id"=>["SABnzbd_nzo_Tfueex"], "msgid"=>[{}], "filename"=>["top.gear.australia.s04e02.ws.pdtv.xvid-bwb-sample.avi"], "mbleft"=>["405.237011909"], "mb"=>["405.237011909"]}]} There are downloads ongoing. HDA shall stay awake. [root@amahi some_testing]#
hope this helps. the output seems to be working.

wouldnt it be simpeler to just monitor the disk activity in the cache and download folder of the sabnzbd app?
if that would work, then that would also work for uTorrent and Transmission app (for downloading torrents)...

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: how to check activity of the sabnzbd app?

Postby jayrock » Tue Sep 06, 2011 10:31 pm

Thanks for testing!!!

If you install the latest version of AES, you can start to use it - I just need to modify the script a little bit, should be done during today. Check the forums. EDIT: See second post here: http://forums.amahi.org/viewtopic.php?f ... 486#p16486

In principle it is possible to monitor disk activity. But I prefer to get status from the information source, and the module that really knows if downloads are ongoing is sabnzbd itself.

Cheers,

jayrock

kikkegek
Posts: 341
Joined: Sun Jul 31, 2011 9:28 am

Re: how to check activity of the sabnzbd app?

Postby kikkegek » Wed Sep 07, 2011 2:15 am

Thanks for testing!!!

If you install the latest version of AES, you can start to use it - I just need to modify the script a little bit, should be done during today. Check the forums. EDIT: See second post here: http://forums.amahi.org/viewtopic.php?f ... 486#p16486

In principle it is possible to monitor disk activity. But I prefer to get status from the information source, and the module that really knows if downloads are ongoing is sabnzbd itself.

Cheers,

jayrock
hey Jayrock! you Rock, hahahaha...

thanks man...that is soo cool....I'll uinstall this script 2nite.

Is this also possible for the Transmission app?

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: how to check activity of the sabnzbd app?

Postby jayrock » Wed Sep 07, 2011 3:32 am

Thanks for testing!!!

If you install the latest version of AES, you can start to use it - I just need to modify the script a little bit, should be done during today. Check the forums. EDIT: See second post here: http://forums.amahi.org/viewtopic.php?f ... 486#p16486

In principle it is possible to monitor disk activity. But I prefer to get status from the information source, and the module that really knows if downloads are ongoing is sabnzbd itself.

Cheers,

jayrock
hey Jayrock! you Rock, hahahaha...

thanks man...that is soo cool....I'll uinstall this script 2nite.

Is this also possible for the Transmission app?
This particular script works with sabnzdb only. It may however be possible to create a similar script for Transmission. Since I'm not using Transmission myself, I'd suggest to check in the transmission subforum.

/jayrock

Who is online

Users browsing this forum: No registered users and 47 guests