pcp
[Top] [All Lists]

Re: [pcp] Dynamic Proc PMDA metrics

To: pcp@xxxxxxxxxxx
Subject: Re: [pcp] Dynamic Proc PMDA metrics
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Tue, 11 Nov 2014 07:01:53 +1100
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1477043892.10880496.1415600819766.JavaMail.zimbra@xxxxxxxxxx>
References: <545D2CFA.1050600@xxxxxxxxxxx> <1477043892.10880496.1415600819766.JavaMail.zimbra@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
On 10/11/14 17:26, Nathan Scott wrote:
...
3. Couldn't find any precedent for handling long form help text for dynamic
pmdas. So I just generated a header file from the existing help file and
used that. Let me know if you want something different. Attached is the perl
script I wrote for that in case it is generally useful.

We might be able to do some remapping from hotproc -> proc variants, but I
don't think there's any precedence there I can point you towards - I'll can
take a look into that too if you like.


Looks like we've made a mistake when the pmdadynamicFoo stuff was added. Based on a quick code inspection, I think this prototype

typedef int  (*pmdaUpdateText)(pmdaExt *, pmID, int, char **);

should have included another int parameter to allow the "type" from pmdaDynamicLookupText() to be passed through to the callback routine registered via pmdaDynamicPMNS() that I'm guessing your PMDA is using in its own version of pmdaText() (rather than the default one).

This means you can't get indom helptext either for a dynamic indom that is associated with a dynamic metric (and otherwise unknown to the PMDA).

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