pcp
[Top] [All Lists]

pmcd gives up on slow starting Perl PMDA

To: pcp developers <pcp@xxxxxxxxxxx>
Subject: pmcd gives up on slow starting Perl PMDA
From: Martins Innus <minnus@xxxxxxxxxxx>
Date: Fri, 21 Mar 2014 15:47:43 -0400
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
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

Attachment: pmdasimple_perl.diff
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>