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
|