pcp
[Top] [All Lists]

Re: multiple PMDA's with one root

To: gilly <gilly@xxxxxxxxxx>
Subject: Re: multiple PMDA's with one root
From: Ken McDonell <kenmcd@xxxxxxxxxxxxxxxxx>
Date: Thu, 5 Jul 2001 10:37:47 +1000
Cc: <pcp@xxxxxxxxxxx>
In-reply-to: <015101c103b1$459916c0$2a04000a@exanet>
Reply-to: <kenmcd@xxxxxxx>
Sender: owner-pcp@xxxxxxxxxxx
On Tue, 3 Jul 2001, gilly wrote:

> Is it possible to create different PMDA's with one root in the PMNS?
> For example - if I use different PMDA's for different linux services (PMDA's
> like -  linux_nfs, linux_disk, linux_kernel, etc...), but I want all these
> PMDA's to be set under one root named linux in the PMNS.

I think this is both possible and may be not possible (it depends
_exactly_ on what you want to do).

It is possible in the sense that the PMNS is a tree, that provides
a taxonomy from names to PMIDs and it is the domain (top-level) part
of the PMID that identifies the PMDA that knows how to answer questions
about a particular metric.

So, this is a valid PMNS

    $ pminfo -m -n root
    linux.nfs.one PMID: 80.0.0
    linux.nfs.two PMID: 80.0.1
    linux.disk.three PMID: 81.0.0
    linux.disk.four PMID: 81.0.1
    linux.kernel.mumble PMID: 82.0.0
    linux.kernel.fumble PMID: 82.0.1
    linux.kernel.stumble PMID: 82.0.2

The will continue to work as long as the metrics provided by
each PMDA end up in non-overlapping parts of the PMNS.  This is
true in the example above.

But it is not true here (where I have promoted the linux.kernel.*
metrics to be linux.* metrics):

    $ pminfo -m -n root
    linux.nfs.one PMID: 80.0.0
    linux.nfs.two PMID: 80.0.1
    linux.disk.three PMID: 81.0.0
    linux.disk.four PMID: 81.0.1
    linux.mumble PMID: 82.0.0
    linux.fumble PMID: 82.0.1
    linux.stumble PMID: 82.0.2

The problem here is that if you remove the PMDA providing mumble,
fumble and stumble (i.e. domain 82) then you must remove all metrics
starting at their common prefix, i.e. at linux ... this will also remove
the linux.nfs and linux.disk metrics which is a bad thing.  It turns
out that adding a PMDA starts by culling any of its old names (using the
same name prefix procedure, since the old names cannot be correctly
enumerated if they belong to an old PMDA that has been replaced by a new
version of the same PMDA), and then installing the new names. So _either_
Installing or Removing the domain 82 PMDA would also remove the names for
the metrics from domain 80 and 81 in the PMNS above ... clearly this is
a BAD thing.

Note this is a function of the way we update the PMNS in the scripts
that sit behind the PMDA Install and Remove scripts, rather than the
design of the PMNS per se.

> If so, where should I define this 'linux' root ('cause the different PMDA's
> don't know of each other)?


Something like this in /var/pcp/pmns/root ...

root {
    ...
    linux
    ...
}

linux {
    nfs
    disk
    kernel
}

linux.nfs {
    ...
}

etc.


-



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