pcp
[Top] [All Lists]

Re: [pcp] Few namespace questions

To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>, pcp developers <pcp@xxxxxxxxxxx>
Subject: Re: [pcp] Few namespace questions
From: Marko Myllynen <myllynen@xxxxxxxxxx>
Date: Mon, 30 Nov 2015 13:13:30 +0200
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <565B5E3F.5060604@xxxxxxxxxxxxxxxx>
Organization: Red Hat
References: <565B302C.4010108@xxxxxxxxxx> <565B5E3F.5060604@xxxxxxxxxxxxxxxx>
Reply-to: myllynen@xxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
Hi,

On 2015-11-29 22:21, Ken McDonell wrote:
> On 30/11/15 04:04, Marko Myllynen wrote:
>>
>> most PCP clients implement the -n option to load an alternative
>> namespace from a given file. For consistency I was thinking to add this
>> to pmrep as well but the more I investigated the more unclear the
>> situation became so I'd appreciate some clarifications here.
> 
> -n comes from the very earliest versions of PCP where the PMNS was not
> exported by pmcd and not stored in archives (this is the pre-
> "distributed PMNS" time, which was just after the demise of the
> Hollerith punched card)

:)

> It has survived in pminfo (which also dates from that time) for
> long-forgotten compatibility reasons, but has been cloned into most
> other PCP clients based on mimicry not functional demand.
> 
> Beyond some obtuse fault injection justification in QA, there is no real
> reason for -n to be supported by any new command.

Ok, good, I've dropped to the todo item from pmrep.

> No.  "duplicates" is a bit ambiguous.  Your example shows a duplicate
> _name_ (mem.util.used) ... this sort of duplicate has always been
> invalid.  The "duplicates" that pmLoadASCIINameSpace() optionally
> accommodates are where two _different_ names have the _same_ PMID.

Right, of course, with unique names but duplicate PMIDs it's working.

>> Testing with pminfo using the PMNS_DEFAULT environment variable
>> mentioned in PCPIntro(1) was also unhelpful, looks like PMNS_DEFAULT
>> requires a pmLoadASCIINameSpace() / pmLoadNameSpace() call with filename
>> PN_NS_DEFAULT? If so then to me it looks like PCPIntro(1) and the code
>> are not in sync.
> 
> Not sure about this one.  PM_NS_DEFAULT has to be passed as an argument
> to pmLoadNameSpace() or pmLoadASCIINameSpace() and there are only a
> handful of apps that need to do this (pmcd, dbpmda, pmlogger, newhelp,
> checkhelp).  I don't see any obvious disconnect between PCPIntro(1) and
> the code here.

Strange, rereading the man page makes it much clearer :) Yes, I think
the page is ok.

> Just skip -n/-N for pmrep (and any new PCP client) would be my suggestion.

Will do. Thanks for your insights.

Cheers,

-- 
Marko Myllynen

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