pcp
[Top] [All Lists]

Re: [pcp] draft pmval event support patch

To: David Smith <dsmith@xxxxxxxxxx>
Subject: Re: [pcp] draft pmval event support patch
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Wed, 02 Mar 2011 07:19:57 +1100
Cc: pcp@xxxxxxxxxxx
In-reply-to: <4D6D0D30.2060507@xxxxxxxxxx>
References: <4D6D0D30.2060507@xxxxxxxxxx>
Reply-to: kenj@xxxxxxxxxxxxxxxx
On Tue, 2011-03-01 at 09:13 -0600, David Smith wrote:
> Since I'm working on a PMDA that supplies event records, I really needed
> pmval to have event support.  So, I stole the support from pminfo and
> threw it into pmval.  I've attached the patch I used.  This is a draft
> patch, since I know it needs to be improved.  This is (hopefully) a
> starting point.
> 
> Known things wrong with it: it ignores pmval's column width argument, it
> always errors if an instance disappeared (no 'pminfo -F'), the output
> formatting might need to be improved to fit into more what pmval
> normally does.
> 
> So, feel free to point out places/things that need to be improved.
> 
> Here's what it currently outputs:

David,

I wonder if it would be better to simply gut pmval to create a new tool
specifically for event records ... a fair amount of what pmval does is
not going to be very useful (I suspect) for event records, e.g.

- column-based output format
- only one metric at a time (I think we may have more than one event
type metric in the future) ... so the default would be to report all
event records, with optional metricnames on the command line to restrict
the output to _just_ those metrics
- -r raw mode
- -U don't interpolate (this would be the default and only behaviour for
an archive source)
- -d (delay mode for archives)
- -n is not needed for new tools

I think the gui controls stuff should stay as it might be useful in
concert with pmchart to see event records temporally correlated with
charts.

So we'd end up with something with a usage like ...

Usage: pmevent [options] [metricname ...]

Options:
  -A align      align sample times on natural boundaries
  -a archive    metrics source is a PCP log archive (interpolate values)
  -g            start in GUI mode with new time control
  -h host       metrics source is PMCD on host
  -i instance   metric instance or list of instances - elements in an
                instance list are separated by commas or whitespace
  -K spec       optional additional PMDA spec for local connection
                spec is of the form op,domain,dso-path,init-routine
  -O offset     initial offset into the time window
  -p port       port number for connection to existing time control
  -S starttime  start of the time window
  -s samples    terminate after this many samples
  -T endtime    end of the time window
  -t interval   sample interval [default 1 second]
  -Z timezone   set reporting timezone
  -z            set reporting timezone to local time of metrics source

So I'd be inclined to apply your patch, copy the pmval subdirectory and
fire up the chain saw.

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