Hi Frank
Thanks for your reply.
> The architected way would be to have your pcp client restrict the
> instance domain for the proc. metrics via pmAddProfile etc. if in the
> PMAPI, or via appropriate command line options if using CLI tools.
Following your advice I tried to specify on the client (here pmlogger spawned
by pmmgr) side the perimeter of interest.
However I did not find any way to explicitly define a subset of process based
on rules in the pmlogger conf.
If there is, don't hesitate to let me know.
I also tried the blunt approach (-U) which I did not manage to properly use, I
suppose, since I always saw all the processes, regardless of whether or not I
was supplying the -A argument to pmdaproc.
I ended up using a cgroup ns:/pcp, and discovered after browsing the source
code that the pmdaproc expected the full path to the cgroup including
subsystem, such as /cgroup/ns/pcp for instance (maybe one example in the doc
would have saved me a few hours here).
This solution is working fine so far. Only problem seems to be that the
processes are selected based on an exact match on the cgroup when the 'belongs
to the cgroup' semantic would seem more natural ( check that the process cgroup
starts with the user supplied value instead). It might have been fixed in the
latest version (I'm running a rather old 3.9.4 version which is standard in
rhel66).
Thanks again for your help !
AG
-----Original Message-----
From: Frank Ch. Eigler [mailto:fche@xxxxxxxxxx]
Sent: 19 July 2015 01:33
To: Aurelien Gonnay
Cc: pcp@xxxxxxxxxxx
Subject: Re: [question] How to monitor specific proc only using pmda proc ?
Hi -
aurelien.gonnay wrote:
> [...]
> My use case is fairly simple:
> [...]
> How can I instruct the local pmda proc to only watch that set of pids ?
The architected way would be to have your pcp client restrict the
instance domain for the proc. metrics via pmAddProfile etc. if in the
PMAPI, or via appropriate command line options if using CLI tools.
IOW, the pcp client would only ask for info on those processes,
therefore return only that data, which then you may log at whatever
rate you like. Note that this selection of instances ("instance
profile") is **per-client** rather than per-server configuration.
(In practice, there have been bugs in some pmdas in ignoring the
instance profile, and loading ("refreshing") unsolicited data about
other processes. That cost pmcd server-side time and sometimes led to
timeouts. Not sure whether these have all been fixed.)
A superblunt way, if applicable, could be to configure the proc pmda
to run under a userid that matches the one used by the interesting
processes on your machines. (Add a -U $USER option into
/etc/pcp/pmcd/pmcd.conf at the pmdaproc line.) Then the proc pmda
wouldn't be able to gather info about other processes in the first
place, so you wouldn't have to muck with instance domains.
- FChE
___________________________________
The integrity of this message cannot be guaranteed on the internet. Therefore
EXANE cannot be considered responsible for the contents.
If you are not the intended recipient of this message, please delete it and
notify the sender.
This message is provided for information purposes only and should not be
construed as a solicitation or offer to buy or sell any securities or related
financial instruments.
Although it may contain some elements from publications produced by Exane's
research department, this message is not research.
Please consult our web site for important disclaimers and disclosures
concerning Exane's research. (http://www.exane.com)
___________________________________
|