pcp
[Top] [All Lists]

Re: [pcp] perfevent metric name changes

To: Nathan Scott <nathans@xxxxxxxxxx>
Subject: Re: [pcp] perfevent metric name changes
From: Martins Innus <minnus@xxxxxxxxxxx>
Date: Mon, 21 Sep 2015 14:47:37 -0400
Cc: pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1305478563.35597179.1442806502755.JavaMail.zimbra@xxxxxxxxxx>
References: <55FC4C37.7030709@xxxxxxxxxxx> <1305478563.35597179.1442806502755.JavaMail.zimbra@xxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
Nathan,

On 9/20/15 11:35 PM, Nathan Scott wrote:
this since there are possibly hundreds of different metrics that could
exist depending on your architecture. The metric names are generated on
the fly from what libpfm provides.

Any thoughts on other ways to mitigate issues for others who may be
using this pmda?
Only thought so far would be to provide a little shell script that can
produce pmlogrewrite files based on the local metrics, that people could
run & then install the config (manually) when doing the switch over.  If
we place that in /var/lib/pcp/pmdas/perfevent/ (permanently) and then
document it a bit on the pmdaperfevent man page, that's probably enough?

Good idea, I did this, but to make it work, I had to do the following to allow pmlogrewrite to allow the invalid names in the configuration file:

--- a/src/pmlogrewrite/lex.l
+++ b/src/pmlogrewrite/lex.l
@@ -178,7 +178,7 @@ dupstr(char *s, int strip_quotes)
[0-9]+\.\*\.\* { yylval.str = dupstr(yytext, 0); return TOK_PMID_STAR; }

        /* Generic name, e.g. for identifier or metric or hostname */
-[A-Za-z][A-Za-z0-9_.]* { yylval.str = dupstr(yytext, 0); return TOK_GNAME; } +[A-Za-z][A-Za-z0-9_.=-]* { yylval.str = dupstr(yytext, 0); return TOK_GNAME; }

 \#.*                   { }



This change and my script are in the same git branch. I just added the 2 characters I have seen on our hardware. Is that acceptable? If so, I'll finish up the packaging and documentation.

Martins

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