pcp
[Top] [All Lists]

RE: [pcp] log import needs ability to write mark records?

To: "'Mark Goodwin'" <mgoodwin@xxxxxxxxxx>, "'pcp'" <pcp@xxxxxxxxxxx>
Subject: RE: [pcp] log import needs ability to write mark records?
From: "Ken McDonell" <kenj@xxxxxxxxxxxxxxxx>
Date: Fri, 19 Feb 2016 17:38:56 +1100
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <56C691E0.4050808@xxxxxxxxxx>
References: <56C691E0.4050808@xxxxxxxxxx>
Thread-index: AQHvyfb6m+pdJzgsqjl3bflfMPSsSZ72GTZA
> -----Original Message-----
> From: pcp-bounces@xxxxxxxxxxx [mailto:pcp-bounces@xxxxxxxxxxx] On
> Behalf Of Mark Goodwin
> Sent: Friday, 19 February 2016 2:54 PM
> To: pcp <pcp@xxxxxxxxxxx>
> Subject: [pcp] log import needs ability to write mark records?
> 
> collectl2pcp can take multiple input logs from collectl and create a
> single PCP archive. The input logs are often not temporally
> contiguous, i.e. there may be a time interval between one log and the
> next.
> 
> Replaying the PCP log produces some unexpected results, and I suspect
> this may be due to missing mark records. Is there any way to write out
> a <mark> record in the PCP log, between processing input files? I
> don't see any pmiFoo API function in LOGIMPORT for this ...?
> 
> maybe it's better to write individual PCP logs, and then merge them?

Mark,

If you're sure about the temporal discontinuity (a real gap between the end
of one archive and the start of the next archive in temporal order), then I
could see the case for adding pmiPutMark() or similar to the Perl LogImport
module (I don't think this is a libpcp candidate, so the implementation will
need to be entirely in the perl wrapper).

The code behind pmiPutMark() is a little tricky ... see putmark() in
pmlogger/src/callback.c

On the other hand, if collectl2pcp can't be sure of the temporal semantics,
it would be better to process one archive at a time and then let
pmlogextract merge 'em all if you need a single output archive.

Dave,

Please note this brings up a case where pmlogextract should _not_ follow the
new multiple-archives semantics ... it _really_ needs to know where each
archive ends, so transparently stitching multiple archives together under
the covers in libpcp is going to be an issue.  I think we need a discussion
on some sort of new API to allow tools to discover how many archives are
really behind an archive context ... pmlogextract needs the answer to be 1
for all of the input archive "names" on the command line (I think).

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