pcp
[Top] [All Lists]

Re: [pcp] pmie cannot get insance names for single instance metrics

To: Max Matveev <makc@xxxxxxxxx>
Subject: Re: [pcp] pmie cannot get insance names for single instance metrics
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Sun, 06 Jun 2010 10:49:29 +1000
Cc: pcp@xxxxxxxxxxx
In-reply-to: <19464.38264.9175.258233@xxxxxxxxxxxx>
References: <19464.38264.9175.258233@xxxxxxxxxxxx>
Reply-to: kenj@xxxxxxxxxxxxxxxx
On Fri, 2010-06-04 at 15:56 +1000, Max Matveev wrote:
> It all started with pmie dumping core on me while evaluating a rule
> which looks like

[long sad story deleted]

> $ cat ~/nx
> some_inst ( match_inst "^e1000" network.link.state != 0) -> print "%i is bad";
> $ pmie -T2s -t1s -c ~/nx
> Fri Jun  4 15:53:45 2010: ??? unknown %i is bad
> Fri Jun  4 15:53:46 2010: ??? unknown %i is bad
> Fri Jun  4 15:53:47 2010: ??? unknown %i is bad
> [Fri Jun  4 15:53:47] pmie(19351) Info: evaluator exiting

I think SEGV and ??? unknown are different symtoms for the same
problem ... botched pointer use in the expression tree.

> If I change primary() to not pick arguments of NOP type I get the
> "correct" result.

I don't think this is the correct fix ... see my earlier patch.

> Ken, what's the idea of using tspan and nvals of arguments which
> have size of string in there instead of number of metrics?

The "node" in the expression tree is a Pascal variant record dosed with
steroids and EPO ... tspan is a synonym for string length in the case of
a constant string (sem == SEM_CHAR).  What was matginally wrong until my
second round of fixes was that nvals and nsmpls were strangely not 1 for
string constants, and then the value of a regex quitely got turned from
a string into a compiled regex with nothing in the expression node to
suggest this had happened.

I think this is all fixed now ... please let me know if you see any
repeats or other strangeness after my recent flurry of commits.

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