pcp
[Top] [All Lists]

pmLookupName sts differences

To: pcp <pcp@xxxxxxxxxxx>
Subject: pmLookupName sts differences
From: Martins Innus <minnus@xxxxxxxxxxx>
Date: Thu, 02 Apr 2015 13:49:13 -0400
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
Hi,
Please see the attached code for an example of differences in return value for pmLookupName when a metric is not found depending on whether the top level namespace is handled by a dynamic pmda. For a regular metric (non dynamic) if we give it a bogus metric name, the function returns fine, the appropriate pmID is set to NULL and "sts" reflects the valid number of names converted, as expected.

For a metric that would be rooted at a dynamic tree, it seems the lookups all happen properly, NULL is set for the bogus metric properly, but "sts" returns PM_ERR_NAME.

I think it is somewhere in the pmns<->pdu interaction that the status is being propagated all the way back for dynamic metrics but not normal ones. I'm not familiar enough with this code to figure out the right way to fix it.

Thanks for any insight.

Martins

Attachment: lookuptest.c
Description: Text document

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