Subject: Re: Bittorrent (Was: RE: [HACKERS] [SUGGESTION] CVSync )

From: "Magnus Hagander" <[email-masked]>
Date: Mon, 27 Mar 2006 09:15:23 +0200

> > [moved to -www]
> >
> >> Does anyone here know how to use the latest version of Bittorrent, 
> >> from a server vs client, perspective?  The one we are currently 
> >> running is *ancient*, and I'd like to get that vServer 
> upgraded and 
> >> off the templates, but without someone that knows how to setup the 
> >> newer bittorrent, well, that's just a scary proposition ;(
> >
> > Ancient is a bit strong - it's about a year old. By that 
> definition, 
> > there's a whole lot of things that are a lot worse off on 
> our servers.
> >
> > That said, it's not good. But the fact that something 
> changed on the 
> > box that caused it to stop working in the past couple of 
> days can't be 
> > because of the version, since we've been running that version for a 
> > year.
> 
> 'k, I looked at the server based on your report, and 
> everything looks fine ... so, can you let me know how to 
> reproduce the problem you are seeing?

It's automatically reproduced every 10 minutes. There are two
possibilities:
1) The python processes has started crashing. I don't think so, because
the count keeps going up.
2) They are no longer reported in a way that Proc::ProcessTable can
read. See the code at
http://gborg.postgresql.org/cgi-bin/cvsweb.cgi/portal/tools/bt/updatetor
rents.pl?rev=1.8;cvsroot=pgweb for what we're trying to do. It is
*possible* this is done because the processes are swapped out, though I
*think* I tested the code and it handled that.

> > As for migrating it to a differnt vserver - just make sure 
> you have a 
> > "close enough" version of python, and it should be no 
> problem to just 
> > tar up the whole directory and move it over. I wouldn't be 
> > particularly worried about that part.
> 
> tar up what directory?  its the bittorrent binaries that I'm 
> concerned about ... at some point, they merged all the 
> various "utilities" into one 'bittorrent' script ... there is 
> no longer a 'btlaunchmany.py' script, for instance ...

Tar up /usr/local/www/bt.postgresql.org.
There are no "bittorrent binaries", they are all python scripts. And
they live under taht directory along with all our utility scripts.

> And not sure what you are talking about concerning 'a year', 
> but bittorrent was originally installed back in Nov of '03, 
> according to the file stamps:
> 
> # ls -lt bt*
> -rw-r--r--  1 root  wheel  5833 Nov 24  2003 btmakemetafile.pyc
> -rw-r--r--  1 root  wheel  6385 Nov 15  2003 btdownloadheadless.pyc

Where are you looking? That's before I started doing the web stuff, and
I'm definitly the one who put in what's tyhere now.

svr4# pwd
/usr/local/www/bt.postgresql.org/auto/bt
svr4# ls -l
total 154
drwxr-xr-x  4 bt    robot    1024 Mar 24  2005 BitTorrent-4.0.1
-rw-r--r--  1 bt    wheel  154427 Mar 25  2005 BitTorrent-4.0.1.tar.gz
lrwxr-xr-x  1 root  wheel      16 Apr 11  2005 bt -> BitTorrent-4.0.1

(Meaning I may be responsible for the weird groupid usded there :-P)

//Magnus

---

From: "Marc G. Fournier" <[email-masked]>
Date: Mon, 27 Mar 2006 15:13:17 -0400 (AST)

> It's automatically reproduced every 10 minutes. There are two

'k, I'm seeing processes running since 2pm Sunday ... so "every 10 
minutes", what exactly is happening?

# ps aux | grep btlaunchmany | grep Sun02 | wc -l
       36

> *think* I tested the code and it handled that.

'k, first ... "processes are swapped out" ... unless something really odd 
is happening, I've never heard of a process swapped out that is removed 
from the process table ... at least not under FreeBSD ...

second ... have you manually verified that the process(es) *aren't* 
running, or just relying on that script?  As i stated above, I see 36 
processes running for the past 24 hrs +, and a bunch for a shorter period 
...

> they live under taht directory along with all our utility scripts.

Ah, okay ... I thought that we were using bittorrent as was installed ages 
ago, not a self-maintained version ... but, if that is the case, then I'm 
going to get rid of the template stuff over there sometime this week, 
since that will be simple enough to do ... python 2.4.2 is auto-installed, 
so no problems there ...

If you can be online tomorrow afternoon ... ?  that way, when I bring it 
back up, you are able to look over it for any issues ...

But, it doesn't look like bittorrent is reaping child processes:

# ps aux | grep "(python)" | wc -l
      166

out of:

# ps aux | grep python | wc -l
      201

> I'm definitly the one who put in what's tyhere now.

/usr/local/bin ...

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: [email-masked]           Yahoo!: yscrappy              ICQ: 7615664