pcp
[Top] [All Lists]

Re: [pcp] python bindings

To: Stan Cox <scox@xxxxxxxxxx>
Subject: Re: [pcp] python bindings
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Thu, 14 Jun 2012 10:46:04 +1000 (EST)
Cc: pcp@xxxxxxxxxxx, Michael Werner <mtw@xxxxxxxxxxxxxx>
In-reply-to: <4FD9086A.1050805@xxxxxxxxxx>
Hi Stan,


pcpfans(1) in src/src/python now has the beginnings of a system
statistics collector called pm-collectl.py (appended).   The python
Interesting stuff!  Is the intention there to make it output-compatible with collectl?

directory contains, and the tool uses, Michael Werner's python bindings
(plus changes and additions)  Any thoughts on a plan to move the python
bindings to the mainstream pcp upstream?

Since we might hope to see any number of new client tools that might be of
general use to people, I would vote for including it directly in the PCP build,
rather than as a separate tree (as Michael's initial variant was).  But others may
violently disagree based on the level of pain having some perl bindings in-tree
has caused.

I'd also suggest having the core API and test code, that pmapi.c code in one
directory (src/python as you have it looks good to me - but also consider the
future which might contain a pmda.c too), and definitely split out the tool(s)
into separate src/<tool> directories.

I'll take a closer look at the code this evening when I have a bit more time,
but a couple of other very minor things from a cursory glance...

There seem to be a few missing odds and ends - I'm not sure how python
docs are usually done - are these generated from the code (like perl pod?),
or would a separate man page (or other doc...?) be better?  Something to get
someone like me (total python newbie) up and running would be great, but
also documenting the API, pm-collectl options, and so on, would be good.
That assumes the python API is not still in-flux, if it is I'd wait until it settles
of course.

The core/API python makefile will eventually need to have an install target
I guess - I had a go at getting pm-collectl to run, but didn't really know what
I was doing. :)  I found the README from Michael's tree but looks like I
don't have needed packages installed - will try that later too.  Eventually,
configure.in will have to turn on/off the python bits in the build (looks like
Python.h needed, and some other toolchain support - a distutils tool?).

cheers.

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