From: Brad N. <BNI...@no...> - 2007-11-08 16:50:54
|
>>> On 11/7/2007 at 4:16 PM, in message <d4c...@ma...>, "Bernard = Li" <be...@va...> wrote: > Hi Brad: >=20 > On 11/7/07, Brad Nicholes <BNI...@no...> wrote: >=20 >> Yes, the fact that the .py file exists in the=20 > /usr/lib/ganglia/python_modules directory means that mod_python will=20 > automatically load the module. Gmond will not try to collect metrics = from it=20 > or call any of its handlers, but it will load the module. The only way = to=20 > avoid this is to move the .py file out of the directory or give it a=20 > different extention. So to disable a python module, you not only have = to=20 > rename the .conf file, but you also have to move or remove the correspond= ing=20 > .py file itself. >> So the more interesting question is why won't the tcpconn module = load? =20 > One of the nice things about building a gmond python module is that you = can=20 > actually do all of the development and debugging completely independent = from=20 > gmond. In other words, you can just run the .py script directly = through=20 > python and it will function just as if gmond had called it. Have you = tried=20 > to run tcpconn.py directly in python? I would be interested to know = what it=20 > is failing on. >=20 > # python tcpconn.py > Traceback (most recent call last): > File "tcpconn.py", line 33, in ? > import os, sys, subprocess > ImportError: No module named subprocess >=20 > # rpm -q python > python-2.3.4-14.4 >=20 > 'subprocess' was introduced in Python 2.5 I believe -- perhaps you can > re-write it using popen? >=20 Perfect, that's what I needed to know. Brad |