With the changes below, we now have the PCP infrastructure supporting
this sort of services for event records ...
$ pminfo -x sample.event.records
sample.event.records
value [4 event records (7 missed) timestamps 20:05:58.686...20:06:01.686]
--- event record [0] timestamp 20:05:58.686 ---
sample.event.type (29.0.127)
value 4
sample.event.param_u64 (29.0.131)
value 5
sample.event.param_string (29.0.134)
value "6"
--- event record [1] timestamp 20:05:59.686 ---
sample.event.type (29.0.127)
value 7
sample.event.param_double (29.0.133)
value 8
sample.event.param_double (29.0.133)
value -9
--- event record [2] timestamp 20:06:00.686 ---
sample.event.type (29.0.127)
value 10
sample.event.param_u64 (29.0.131)
value 11
sample.event.param_string (29.0.134)
value "twelve"
sample.event.param_string (29.0.134)
value "thirteen"
sample.event.param_32 (29.0.128)
value -14
sample.event.param_u32 (29.0.129)
value 15
--- event record [3] timestamp 20:06:01.686 ---
sample.event.type (29.0.127)
value 16
sample.event.param_float (29.0.132)
value -17
sample.event.param_aggregate (29.0.135)
value 18410503204342530817 -1.371380375612005e+306 [0103070f1f3f7fff]
So, I'm done for this one!
Changes committed to git://oss.sgi.com/kenj/pcp.git dev
man/man1/pmdacisco.1 | 8
man/man1/pminfo.1 | 9
man/man1/pmlogextract.1 | 2
man/man3/GNUmakefile | 3
man/man3/pmatomstr.3 | 11
man/man3/pmextractvalue.3 | 36 -
man/man3/pmfreeeventresult.3 | 52 +
man/man3/pmlookupdesc.3 | 9
man/man3/pmunpackeventrecords.3 | 123 +++
src/cpan/PMDA/cvalue.c | 7
src/dbpmda/src/dso.c | 5
src/genpmda/genpmda | 6
src/include/impl.h | 69 +-
src/include/pmapi.h | 90 ++
src/include/pmda.h | 12
src/libpcp/src/GNUmakefile | 2
src/libpcp/src/context.c | 2
src/libpcp/src/derive.c | 8
src/libpcp/src/derive_fetch.c | 16
src/libpcp/src/endian.c | 110 +++
src/libpcp/src/err.c | 2
src/libpcp/src/events.c | 385 ++++++++++-
src/libpcp/src/interp.c | 7
src/libpcp/src/logutil.c | 2
src/libpcp/src/p_instance.c | 10
src/libpcp/src/p_pmns.c | 12
src/libpcp/src/p_result.c | 6
src/libpcp/src/p_text.c | 2
src/libpcp/src/pdu.c | 4
src/libpcp/src/stuffvalue.c | 13
src/libpcp/src/units.c | 17
src/libpcp/src/util.c | 55 +
src/libpcp_pmda/src/GNUmakefile | 2
src/libpcp_pmda/src/callback.c | 31
src/libpcp_pmda/src/libdefs.h | 4
src/pmdas/cisco/Install | 13
src/pmdas/cisco/cisco.c | 26
src/pmdas/cisco/pmda.c | 8
src/pmdas/cisco/probe.c | 62 +
src/pmdas/cisco/telnet.c | 68 +-
src/pmdas/sample/help | 61 +
src/pmdas/sample/pmns | 29
src/pmdas/sample/src/GNUmakefile | 5
src/pmdas/sample/src/events.c | 391 ++++++++++-
src/pmdas/sample/src/events.h | 32
src/pmdas/sample/src/percontext.h | 4
src/pmdas/sample/src/sample.c | 1258 +++++++++++++++++++-------------------
src/pmdas/trace/src/trace.c | 2
src/pmdumplog/pmdumplog.c | 59 +
src/pmie/src/pragmatics.c | 2
src/pminfo/pminfo.c | 61 +
src/pmlogger/GNUmakefile | 2
src/pmlogger/callback.c | 10
src/pmlogger/events.c | 105 +++
src/pmlogger/logger.h | 3
src/pmstore/pmstore.c | 6
src/pmval/pmval.c | 9
57 files changed, 2488 insertions(+), 860 deletions(-)
commit f50b7ffc78dcca5326fc91175eb18c0ef2a47942
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Tue Nov 23 19:48:38 2010 +1100
PM_TYPE_EVENT support - last round
- pmdumplog expands and reports any event records found
- pmie will not accept PM_TYPE_EVENT metrics in any expression
- pmstore refuses to modify the value of PM_TYPE_EVENT metrics
- pmval will not report values for PM_TYPE_EVENT metrics
commit 81e61dc6f2599947c035b6583ad55e51dd9c7328
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Tue Nov 23 13:59:30 2010 +1100
PM_TYPE_EVENT support - round four
- add helper functions
int __pmCheckEventRecords(pmValueSet *) and
void __pmDumpEventRecords(FILE *, pmValueSet *)
to libpcp for processing the metric values that purport to be a packed
array of event records ... the checking is of necessity paranoid in
the extreme
- redefine the API for pmUnpackEventRecords to use a pmValueSet *,
rather than a pmValueBlock * to allow the entire value of the
metric to be validated and restructure implementation of
pmUnpackEventRecords to use __pmCheckEventRecords and
__pmDumpEventRecords (in the event of __pmCheckEventRecords finding
a problem)
- pmlogger groks PM_TYPE_EVENT and emits metadata for all event parameter
metrics
- include recently added man pages in the image build
- clean up some of the man page that need brief references to
PM_TYPE_EVENT alongside PM_TYPE_AGGREGATE et al
- trivial change to genpmda to generate the stub code for PM_TYPE_EVENT
- add error injection code for sample PMDA and sample.event.records
metric that is triggered by using pmstore to set sample.event.reset
to a negative number (currently only -1 is implemented to generate
a bad PMID for an event parameter)
commit 3d4f3947d41a7472fc49769a99b280d52ba6ec17
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Mon Nov 22 08:58:31 2010 +1100
PM_TYPE_EVENT support - round three
Add new libpcp file (events.c) and man pages that should have
been in the round two commit.
Also add derived metrics support for PM_TYPE_EVENT (only renaming
is allowed), and plug a very small memory leak in pmLoadDerivedConfig().
commit c0450118d2f51b60a55fd299b09c0b481838041b
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Mon Nov 22 06:55:13 2010 +1100
interp.c - no interpolation for PM_TYPE_EVENT metrics
pmFetch will return with numval set to PM_ERR_TYPE should this
be attempted.
commit 28430114373d02b380c341ed28c5aaa029375c28
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Sun Nov 21 20:00:57 2010 +1100
PM_TYPE_EVENT support - round round two
- add pmUnpackEventRecords and pmFreeEventResults to libpcp and
associated man pages
- add endian safe encode/decode for PM_TYPE_EVENT values sent via PDUs
... implies working through each event parameter of each event record
packed into the value
- move __pmTimeval declaration from impl.h to pmapi.h ... it is needed
for pmEventRecord (struct timeval won't work across platforms)
- tweak the sample PMDa with some more metrics for event parameter types
to cover all the PMAPI value types
- add -x option to pminfo (like -f, but expand event records if they
are found)
commit 7abe2b39cb8900b49dc8458b326fd1c654a6c176
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Fri Nov 19 09:34:53 2010 +1100
pmDupContext - fix small mem leak
Day One issue, found by QA 394.
commit f2272a33dd8557472167330b112945d720600da7
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Fri Nov 19 09:32:27 2010 +1100
PM_TYPE_EVENT support - round one
Initial changes to support PM_TYPE_EVENT and the pmEventParameter,
pmEventRecord and pmEventArray structures.
Note no endian conversions for PDUs and no pmUnpackEventRecords()
routine as yet.
Also added PM_ERR_TYPE to catch cases in which not all types are
supported for some operations and new macros to help size objects
to a PDU unit boundary (PM_PDU_SIZE and PM_PDU_SIZE_BYTES).
Refined pmdaFetchCallBack semantics for PMDA_INTERFACE_5 to allow
additional return value to indicate strings and aggregates can
be freed after __pmStuffValue has been called - new macros to
make intent more obvious, PMDA_FETCH_NOVALUES, PMDA_FETCH_STATIC
and PMDA_FETCH_DYNAMIC (for the new case).
And sample.event.* metrics are new for the sample PMDA.
Changes in these places: pmapi.h, pmExtractValue(), pmErrStr(),
__pmStuffValue(), pmAtomStr(), pmPrintValue(), __pmPrintDesc(),
sample PMDA.
commit a719120278b08a63c11efb822ea9c77ed126cc48
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Tue Nov 16 06:51:38 2010 +1100
Add PM_PDU_SIZE and PM_PDU_SIZE_BYTES macros
Make arithmetic easier to understand when doing PDU length calculations
and rounding the length of arbitrarily sized objects up to the next
__pmPDU boundary.
commit c44525c1589ffb47d442a0c03ab2a61e8db92f63
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Thu Nov 11 07:06:42 2010 +1100
cisco PMDA - fix compilation warnings in probe.c
commit 0a14211fe8cce7d0625bcb61920d2cac6bfed5dc
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Wed Nov 10 12:30:18 2010 +1100
pmlogextract.1 - fix formatting error
commit 287584fbd8e1be5272bdfe0ebb8750b197365acf
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Mon Nov 8 20:48:22 2010 +1100
Cisco pmda - fixup and cleanup
Continuation of the last round of commits. This time fixing the
logic (especially around the new -s prompt option and !prompt component
of interface spec) after some more serious QA.
Also rationalized and documented the appl? diagnostic options, after
adding more diagnostics.
Properly promoted the (big) bytes counters to 64-bit.
|