pcp
[Top] [All Lists]

Recording event trace metrics

To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Subject: Recording event trace metrics
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Sun, 19 Aug 2012 06:04:51 -0400 (EDT)
Cc: pcp@xxxxxxxxxxx
In-reply-to: <176731254.30866621.1345369917804.JavaMail.root@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Hi Ken,

Looking inside a PCP archive containing event trace data,
I came across a quirk.  It looks like pmlogger is storing
a result structure on every sample, even when no records
were returned.  For example ...

[28 bytes]
12:35:36.516  112.0.4 (bash.xtrace.records): No values returned!

[28 bytes]
12:35:38.516  112.0.4 (bash.xtrace.records): No values returned!

[28 bytes]
12:35:40.516  112.0.4 (bash.xtrace.records): No values returned!

[28 bytes]
12:35:42.516  112.0.4 (bash.xtrace.records): No values returned!

[28 bytes]
12:35:44.516  112.0.4 (bash.xtrace.records): No values returned!

[28 bytes]
12:35:46.516  112.0.4 (bash.xtrace.records): No values returned!
...

Which looks like a pmResult struct with timestamp, numpmid
set to one, and a valueset with no values?  This seems a bit
suboptimal for event traces (probably a fairly common case),
whereas the behaviour is fine for the traditionally sampled
non-event-trace style metrics.

Would a sensible approach be to flatten (possibly into nothing)
the result structure before each write in pmlogger?  Would you
expect any oddness with the temporal index with that approach?
(if so, would an occasional mark record make sense - I imagine
this introduces some unusual corner cases for pmlogger now -
such as archives with no data at all!).  Any other potential
gotchas you can foresee here?

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>
  • Recording event trace metrics, Nathan Scott <=