Re: Parfait and UoM (java) RPM packages

"Marko Myllynen" <[email protected]>
Newsgroups gmane.comp.sysutils.pcp
Organization Red Hat
Message-ID <[email protected]>
Hi,

On 2016-10-19 10:44, Marko Myllynen wrote:
> On 2016-10-19 01:45, Nathan Scott wrote:
>>> Thank you.
>>
>> No problem.  Have you had a chance to try them out?
> 
> I tried them out. Here are the steps I used on a fresh F24 installation,
> perhaps these coud serve as a basis for Quick Guide Java section when
> all the pieces are in place:
> 
> 1. Install PCP, enable pmcd, make sure MMV is on, and metrics ok
> 2. Install Java if needed, check it works
> 3. Install Parfait from the Copr repo
> X. Fix parfait-agent.jar, can be skipped when the fix is in the next RPM
> build: unzip the jar, remove the top-most MANIFEST.MF, add the following
> line to META-INF/MANIFEST.MF, and re-create the jar:
> Premain-Class: io.pcp.parfait.ParfaitAgent
> 4. Start a Java application with the agent
> # java -cp .:/usr/share/java/parfait
> -javaagent:/usr/share/java/parfait/parfait-agent.jar
> 5. Check the newly appeared metrics
> # pminfo mmv
> mmv.HelloWorld.java.uptime

Hmm, when starting first instance of the might HelloWorld test case and
monitoring mmv.HelloWorld.java.uptime for a while, I see the expected
uptime:

# pminfo -f mmv.HelloWorld.java.uptime

mmv.HelloWorld.java.uptime
    value 49516

But when starting second instance, this happens:

# pminfo -f mmv.HelloWorld.java.uptime

mmv.HelloWorld.java.uptime
    value 2534

It seems that any user who is able (*) to start the same application can
"override" the metrics for everyone else.

*) Btw, what's the recommended way to enable MMV for non-root users? I did

# mkdir -p /var/lib/pcp/tmp/mmv
# chgrp testuser /var/lib/pcp/tmp/mmv
# chmod g+rwx /var/lib/pcp/tmp/mmv

but this isn't very appealing as now testuser is able to "override" an
instance being run by root:

# When HelloWorld is running under root:
-rw-r--r--. 1 root root     16K 2016-10-19 11:11 HelloWorld
# When HelloWorld is then started by testuser:
-rw-rw-r--. 1 testuser testuser 16K 2016-10-19 11:11 HelloWorld

Thanks,

-- 
Marko Myllynen

-=-=-=-=-=-=-=-=-=-=-=-
pcp mailing list
[email protected]
https://groups.io/g/pcp/messages
-=-=-
Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#14547): https://groups.io/g/pcp/message/14547
View All Messages In Topic (11): https://groups.io/g/pcp/topic/2895998
Mute This Topic: https://groups.io/mt/2895998?uid=174580
New Topic: https://groups.io/g/pcp/post

Change Your Subscription: https://groups.io/g/pcp/editsub?uid=174580

Group Home: https://groups.io/g/pcp
Contact Group Owner: [email protected]

Terms of Service: https://groups.io/static/tos

Unsubscribe: https://groups.io/g/pcp/leave/354243/563757577/xyzzy
-=-=-=-=-=-=-=-=-=-=-=-
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.