pcp
[Top] [All Lists]

pmcd.options

To: pcp@xxxxxxxxxxx
Subject: pmcd.options
From: Martins Innus <minnus@xxxxxxxxxxx>
Date: Wed, 4 May 2016 14:16:40 -0400
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.0
Hi,
I'm having some trouble with the pmcd.options file and trying to use arguments that contain spaces. This is not my exact use but can be distilled down to something like this:

in pmcd.options:

######
-l "/tmp/test/space dir/log"
######

PMCD fails to start with a usage message:

######
May 4 18:01:54 euca-10-63-11-152 pmcd: Starting pmcd ... PMCD_ROOT_AGENT=1 /usr/libexec/pcp/bin/pmcd -l "/tmp/test/space dir/log"

*May  4 18:01:54 euca-10-63-11-152 pmcd: |/usr/libexec/pcp/bin/pmcd|
*May  4 18:01:54 euca-10-63-11-152 pmcd: |-l|
*May  4 18:01:54 euca-10-63-11-152 pmcd: |"/tmp/test/space|
*May  4 18:01:54 euca-10-63-11-152 pmcd: |dir/log"|

May  4 18:01:54 euca-10-63-11-152 pmcd: Usage: pmcd [options]
May  4 18:01:54 euca-10-63-11-152 pmcd: General options:
May  4 18:01:54 euca-10-63-11-152 pmcd: -n FILE, --namespace=FILE
######  

I added some extra debugging and each of the starred lines above are elements of argv. Its probably something simple but I can't find a quoting method that works.

Starting pmcd manually on the command line works perfectly fine with a quoted string for an option.

I'm guessing its the use of 'eval' in /usr/share/pcp/lib/pmcd and it is strictly splitting on spaces.

Any thoughts if this can be made to work?

Thanks

Martins

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