pcp
[Top] [All Lists]

pcp updates: python pmdas

To: PCP <pcp@xxxxxxxxxxx>
Subject: pcp updates: python pmdas
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Tue, 18 Jun 2013 03:25:27 -0400 (EDT)
Delivered-to: pcp@xxxxxxxxxxx
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: pi+E785Rw/WdjDqWl/UqeJ30KvQByw==
Thread-topic: pcp updates: python pmdas
Changes committed to git://oss.sgi.com/pcp/pcp.git dev

 src/pmdas/simple/pmdasimple.python |   52 ++--
 src/python/pcp/pmda.py             |   67 +++---
 src/python/pmda.c                  |  392 +++++++++++++++++++++++++++----------
 3 files changed, 361 insertions(+), 150 deletions(-)

commit 4721f3dc46b768c70efc57319e7ef96ce976a71c
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Tue Jun 18 17:20:18 2013 +1000

    Functioning instance domains for the pcp.pmda python module
    
    This is the last (for now) piece of the PMDA python wrapping
    puzzle.  The python variant of the simple PMDA now operates
    correctly for all of the different PDU variants.  Yippee!
    
    Particularly problematic were the pmdaCache instance domains
    as there is a bit of a conflict between python insisting on
    maintaining type information, and the (void*) parameters we
    use in the C API so that PMDAs can store whatever they like.
    This is solved using ctypes, with the side-effect that only
    ctypes values can be used with pmdaCache indoms.
    
    Other issues resolved include: ensure the instance callback
    declaration in python PMDAs matches the C calling convention
    (must declare the passed-in indom serial), big improvements
    in the python stacktrace logging when exceptions thrown, and
    correct the argtypes declarations for a couple of the cache
    interface routines from libpcp_pmda (void** vs void*).

commit 281c452b40c4f1cfcede70ad2e8c2687ce34aefc
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Tue Jun 18 13:16:41 2013 +1000

    Update the pmdasimple sample code to clarify the fetch callback
    
    Also removes an opportunity to use an uninitialised times() list,
    which results in an exception and associated badness.

commit 83b1910748b3c78435bf86e5a37ce982c2889ac8
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Tue Jun 18 10:15:03 2013 +1000

    Basic fetch callback methods are now working in python PMDA module
    
    Fixes up the way the tuple returned from the fetch callback is parsed
    back in the C code (before interfacing to libpcp_pmda), adds numerous
    additional checks and diagnostics to the python return values / error
    code, and removes some leftover debug code from earlier commits.

commit 9fb416db53de36785edcd45600b386572359d721
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Mon Jun 17 17:43:06 2013 +1000

    Further work on python pcp.pmda interface modules
    
    Metric namespace refresh now correctly iterates the names
    dictionary and populates the C namespace structures.  The
    short and long help text PDU handling is now also done.

<Prev in Thread] Current Thread [Next in Thread>
  • pcp updates: python pmdas, Nathan Scott <=