Hello,
I've been trying to debug a problem that I can simplify down to the
attached patch to pmdasimple.perl.
Output below:
Log for pmdasimple on gilmour-vm-cent65 started Fri Mar 21 14:19:50 2014
[Fri Mar 21 14:20:00] pmdasimple(31038) Info: Got line: foo
[Fri Mar 21 14:20:00] pmdasimple(31038) Critical: __pmdaSetupPDU: PMDA
pmdasimple send creds: Broken pipe
[Fri Mar 21 14:20:00] pmdasimple(31038) Error: PMDA Initialisation Failed
Log finished Fri Mar 21 14:20:00 2014
I see a similar error posted here:
https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=1073658
but don't know exactly how to deal with that in a perl pmda on startup.
Background is the following. I'm working on adding to the systemtap pmda
and need to collect information on available tap points before I decide
what metrics to make available. Basically a :
$pmda = PCP::PMDA->new('systemtap', 88);
open a pipe with stap -l 'syscall.*' and read each into a hash
for each hash element loop through a whole bunch of : $pmda->add_metric(....
etc, etc....
The stap call takes a couple seconds to run, and seems to be enough to
kill the pmda.
I just simulate the delay with the sleep in the attached example. 10
seconds is extreme. 2-3 seconds seems to be enough to make it fail.
Any suggestions on how to proceed?
Thanks
Martins
pmdasimple_perl.diff
Description: Text document
|