pcp
[Top] [All Lists]

RE: a PMDA using another PMDA

To: <pcp@xxxxxxxxxxx>
Subject: RE: a PMDA using another PMDA
From: "gilly" <gilly@xxxxxxxxxx>
Date: Wed, 18 Jul 2001 10:49:49 +0200
Importance: Normal
In-reply-to: <Pine.LNX.4.21.0107181429090.1373-100000@xxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: <gilly@xxxxxxxxxx>
Sender: owner-pcp@xxxxxxxxxxx
All the answers mentioned pmie, but what I'm trying to implement (and I'm
still not sure I can do it) is to have a PMDA that performs sequential
pmFetch calls - each for a different host, and sums the results as
'total-results'. Trying to run pminfo on this 'total' PMDA I get the
following error:
the metrics' values ARE calculated correctly, but when trying to get the
instances' names (using pmGetInDom() in lookup()) - I get an "Unknown or
illegal instance identifier" error. It seems that the second call
(pmGetInDom, after pmFetch) to the PMDA on the other host doesn't reach its
destination.
Maybe I have a context problem? (I'm not sure I understand the contexts
issue well.)
Thanks, gilly


-----Original Message-----
From: kenmcd@xxxxxxxxxxxxxxxxx [mailto:kenmcd@xxxxxxxxxxxxxxxxx]
Sent: Wednesday, July 18, 2001 9:33 AM
To: gilly
Cc: pcp@xxxxxxxxxxx
Subject: Re: a PMDA using another PMDA


Nathan and Mark pointed to the summary PMDA as an existance proof.

Just remember the PCP protocols are single-threaded, synchronous and
with timeouts ... so be very careful about starvation and deadlock,
e.g. consider the sequence:

client -> pmcd
               -> summary PMDA
                              -> pmie
                                      -> pmcd

The summary PMDA needs two threads of control:

1. launch pmie and block waiting for new values to be returned from
   pmie

2. block on requests from pmcd, and return the most recently observed
   values from 1.

If the nested PMDA is not calling pmcd, then this problem goes away, but
you may have a mutex problem with the nested PMDA having to concurrently
field requests from pmcd and the outermost PMDA ...  remeber that
pmcd runs DSO PMDA requests serially, but runs daemon PMDA requests
in parallel.

On Mon, 16 Jul 2001, gilly wrote:

> Is it possible to write a PMDA which its metrics are accumulative metrics
of
> another PMDA from other hosts? for example - a PMDA that calculates all
RPC
> metrics of 5 hosts it monitors, therefore inside the 'total-RPC' PMDA
> there's a call to pmFetch for the rpc metrics (from linux PMDA) from the
> other hosts (the context is - PM_CONTEXT_HOST). Actually the call to
> 'pmFetch' for the accumulative metrics calls pmFetch for each host - for
the
> calculated metrics.
> Does it matter if the PMDA's are installed as DSO?
> thanks in advance, gilly
>



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