[Ganglia-general] ganglia returns wrong value for python module

2009-08-20 Thread Matt
Hi all, I'm getting inconsistent results when gmond is running my python module # gmond --version gmond 3.1.2 # ./lsof.py (0, '2699') 2699 2700 1000 # gmond -d1 (0, '535') 551 552 1000 --- python code --- #!/usr/bin/python import commands def lsof_handler(name): cmd = 'lsof -p 3123 | wc

Re: [Ganglia-general] ganglia returns wrong value for python module

2009-08-20 Thread Brad Nicholes
On 8/20/2009 at 9:01 AM, in message 68fea9390908200801m3e1f43ecy2c33e743ccc0d...@mail.gmail.com, Matt mattmora...@gmail.com wrote: Hi all, I'm getting inconsistent results when gmond is running my python module # gmond --version gmond 3.1.2 # ./lsof.py (0, '2699') 2699 2700 1000

Re: [Ganglia-general] ganglia returns wrong value for python module

2009-08-20 Thread Matt
Changing the python code to: cmd = 'lsof -p 3454 | wc -l' process = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True) os.waitpid(process.pid, 0) lsof = process.stdout.read().strip() print lsof Gave the same error: # ./lsof.py 235 value for metric1 is 235 # gmond -d1 5 5 I'm running

[Ganglia-general] Custom python metric module: add new section below Constant Metrics

2009-08-20 Thread David Young
Greetings. We're using ganglia 3.1 and have added a python module, via the modpython.so/python_module interface, to monitor some information on our cluster that is currently represented as strings. The information appears in the Time and String Metrics section on the Host Report page; however,