pcp
[Top] [All Lists]

Re: [pcp] Derived metric issues

To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Subject: Re: [pcp] Derived metric issues
From: Lukas Berk <lberk@xxxxxxxxxx>
Date: Tue, 16 Feb 2016 10:16:38 -0500
Cc: Marko Myllynen <myllynen@xxxxxxxxxx>, pcp developers <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <56BA4445.2030404@xxxxxxxxxxxxxxxx> (Ken McDonell's message of "Wed, 10 Feb 2016 06:55:49 +1100")
References: <56B99888.2020408@xxxxxxxxxx> <56BA4445.2030404@xxxxxxxxxxxxxxxx>
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
Hi,

Ken McDonell <kenj@xxxxxxxxxxxxxxxx> writes:
[...]
> So the concept of an "error" here is a bit tricky ...
> - missing file or directory in the PATH-style list ... probably not an
> error, should be silently ignored
> - file that cannot be accessed during recursive descent ... probably
> not an error
> - bad metric spec in a file ... again, not sure as there may be other
> valid definitions in the same file (consider a commonly used derived
> metric file that is expected to work mostly work even if some of the
> definitions involve metrics or PMDAs that might not be available in
> the current context, especially an archive)
>
> This is why  pmLoadDerivedConfig() returns the "will be the number of
> derived metrics loaded" (from the man page) .. in your case this would
> be 0.

Is there any case where, after calling pmLoadDerivedConfig() a
client/user would *expect* there to be zero derived metrics loaded?

In each of the cases mentioned above, we avoid giving an error status
where there are errors with individual or individual sets of derived
metrics when being loaded within a greater set.  I think that makes
sense.  However, if not a single derived metric is loaded, would it not
make sense to try and give a more descriptive return value?

Perhaps it is simply up to the client author to interpret a return value
of 0 accordingly?

Cheers,

Lukas

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