| To: | ryan@xxxxxxxxxxxx |
|---|---|
| Subject: | Re: ANN: pcp-machine - a Lua query engine for PCP |
| From: | fche@xxxxxxxxxx (Frank Ch. Eigler) |
| Date: | Wed, 03 Feb 2016 11:17:09 -0500 |
| Cc: | <pcp@xxxxxxxxxxx> |
| Delivered-to: | pcp@xxxxxxxxxxx |
| In-reply-to: | <c91e1401b60f97dec012aba1d08eeebe@xxxxxxxxxxxx> (Ryan Doyle's message of "Wed, 03 Feb 2016 16:46:20 +1100") |
| References: | <c91e1401b60f97dec012aba1d08eeebe@xxxxxxxxxxxx> |
| User-agent: | Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Hi, Ryan -
> I've spent the last week writing a programmable query engine for
> PCP. It's a bit like pmie, and a bit like the python APIs but focuses
> on simplicity of the API and specifically around querying metrics.
Would it be fair to say that the core portion is more like a lua
binding to the PMAPI, and the pmie portion is the hard-coded lua
conditionals in the samples/*.lua files?
As of 3.11, the former portion can be expressed as pretty compact
python code now. So for example, the samples/nprocs.lua could
look thusly in pcp 3.11 python:
from pcp import pmapi
fg = pmapi.fetchgroup() # defaults to -h local:
nprocs = fg.extend_item("kernel.all.nprocs")
fg.fetch()
if nprocs() > 100:
print("Processes are too high! %d" % nprocs())
- FChE
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: pcp updates: pmclient python version fixes, Frank Ch. Eigler |
|---|---|
| Next by Date: | PCP Updates: kenj, lberk qa, Dave Brolley |
| Previous by Thread: | ANN: pcp-machine - a Lua query engine for PCP, Ryan Doyle |
| Next by Thread: | Re: ANN: pcp-machine - a Lua query engine for PCP, Ryan Doyle |
| Indexes: | [Date] [Thread] [Top] [All Lists] |