Page 1 of 1

Multiple SAB processes

Posted: February 11th, 2008, 8:16 am
by barlow
I've enjoyed SAbnzbd+ 0.3.0 now for about a week on a Debian x86 box :) Many thanks to the devs  :)
That's why i decided i wanted it on my Conceptronic CH3SNAS (NAS which is almost the same as D-Link DNS-323).
The CH3SNAS runs a chrooted Debian etch install. SABnzbd+ 0.3.0 (final) does run and is able to download. It even gets the max speed of my internet connection (about 630 KB/sec)  :D

However there is one weird thing. After starting SABnzbd there are exactly 20 SABnzbd.py (all with different pid) processes running. But on my Debian x86 there is only one SABnzbd.py proces.
What is causing this?

Re: Multiple SAB processes

Posted: February 11th, 2008, 8:29 am
by neilt0
Top on my LinkStation shows 1 process, HTop or other process viewers show multiple processes. What are you using to view processes?

Re: Multiple SAB processes

Posted: February 11th, 2008, 9:13 am
by barlow
Both ps -A and top show 20 processes.

Btw, if i shut down SABnzbd through the webinterface all the processes disappear.

Re: Multiple SAB processes

Posted: February 11th, 2008, 3:40 pm
by rascalli
What command do you use to start sabnzbd+ ?

Re: Multiple SAB processes

Posted: February 11th, 2008, 4:18 pm
by barlow
./SABnzbd.py -d -f sabnzbd.ini
This is in my init script.

Re: Multiple SAB processes

Posted: February 12th, 2008, 1:07 am
by rascalli
That seems normal.

What happens when you use :

./SABnzbd.py -d -f /theplace/wheretheiniis/sabnzbd.ini

Re: Multiple SAB processes

Posted: February 12th, 2008, 2:43 am
by barlow
That makes no difference. Every time exactely 20 processes  :o

Re: Multiple SAB processes

Posted: January 4th, 2009, 2:14 am
by djh01
I'm experiencing the exact same behavior on CentOS 5.2, using htop to monitor processes.

Any resolution to this?

edit: 0.4.6

Re: Multiple SAB processes

Posted: January 4th, 2009, 4:04 am
by shypike
Do you think it's a problem?
The program uses about 20 threads.
How the library of Python creates these threads may depend on the available OS kernel.

Put the program below in a file, let Python run it and see what the OS says about it.

Code: Select all

#!/bin/python

import threading
import time

class Tester(threading.Thread):
    def __init__(self, name):
        threading.Thread.__init__(self)
        self.name = name
    
    def run(self):
        while 1:
            time.sleep(2.0)
            print self.name


one = Tester("one")
two = Tester("two")
three = Tester("three")
four = Tester("four")
five = Tester("five")

one.start()
time.sleep(0.5)
two.start()
time.sleep(0.5)
three.start()
time.sleep(0.5)
four.start()
time.sleep(0.5)
five.start()

while 1:
    time.sleep(0.5)

Re: Multiple SAB processes

Posted: January 4th, 2009, 3:51 pm
by inpheaux
As I posted elsewhere, it's htop, not sabnzbd. htop defaults to showing threads as processes, so multi-threaded applications (like sabnzbd) show up multiple times.