Hi -
The pcpfans.git repo fche/graphite branch has some early results [1].
[1] https://web.elastic.org/~fche/blog3/archive/2014/04/13/pcp-and-graphite
It required correcting a few problems in the python bindings, which
would be really handy to pull from the fche/for-merge branch into
release 3.9.2.
commit 1d235890e44e53d738a6ecc05b08cc2bc7ff2e1b (HEAD, origin/fche/for-merge,
fche/for-merge)
Author: Frank Ch. Eigler <fche@xxxxxxxxxx>
Date: Sat Apr 12 23:57:34 2014 -0400
pcp pmapi: fix pmConvScale parametrization
The python binding to pmConvScale should be given a general pmUnits
struct as a target scale, as at the C PMAPI level, not a parameter
that limits us to "1 $space"-units.
While in the vicinity, fix pmLookupName's exception message to
identify the metrics that failed resolution, instead of an internal
magic python char* rune.
commit 3749b110f1d4e3dd5245779a68a21efdd98df969
Author: Frank Ch. Eigler <fche@xxxxxxxxxx>
Date: Sat Apr 12 22:00:28 2014 -0400
python pmapi.c: Don't crash on exceptions from options_callback()
In case the python routine being invoked exits with an exception
(result is NULL), we shouldn't try to Py_DECREF the bad boy.
For that matter, we shouldn't clear such exceptions with PyErr_Print()
at all, but pass them through to the calling python VM. This cleanup
is left for later.
commit 163db2e7ae96437a33ca8a0535af8bde35e95a34
Author: Frank Ch. Eigler <fche@xxxxxxxxxx>
Date: Sat Apr 12 21:46:51 2014 -0400
libpcp __pmSetProgname: copy incoming string
__pmSetProgname, undocumented but widely loved, is used to being given
system argv[0] as a parameter, which it has saved verbatim under the
assumption that the underlying string can never change. This assumption
is broken by the python pmoptions bindings, wherein random python string
copies are processed, and occasionally handed to __pmSetProgname. This
can easily corrupt pmUsageMessage().
In order to make it safer for mankind, __pmSetProgname henceforth copies
the incoming const char*'s with strdup().
- FChE
|