Re: Parfait and UoM (java) RPM packages

"Nathan Scott" <[email protected]>
Newsgroups gmane.comp.sysutils.pcp
Message-ID <[email protected]>
Hi Marko,

----- Original Message -----
> [...]
> 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.
> 

That's correct - permissions are all filesystem-based - any user can remove/
truncate/overwrite their own files.  We could perhaps add some file locking
here, and prevent the second process from starting... not sure if that's the
right thing to do always though.

Parfait offers ways to deal with this problem - default naming is based on
heuristics however, and they have a habit of failing, or have corner cases. 

The "HelloWorld" part of mmv.HelloWorld.* is figured out by parfait-agent as
its trying to come up with a good name, given no other input.  Its algorithm
is effectively:

1. use an explicit name - ${parfait.name} system property (-Dparfait.name=xxx
   or properties file, or other way of setting JVM properties)

2. try to come up with a good name based on the main() class (this is what you
   are seeing here) - obviously, two versions of the same program will likely
   have the same name.  There's no way within this heuristic to tell that the
   program is running as different instances - it would need to be helped.  Or
   we could change the heuristic to add the PID, etc ... but then its not such
   a nice name.

3. if the above all fail, it falls back to using a name like "mmv.parfaitPID.*"
  (even this can fail, because there's no reliable cross-JVM way to determine
   process ID).

This algorithm could be tweaked of course - please feel to play with it.

And the parfait-agent properties need to be documented more, obviously -
on the TODO list.

So, any help would be much appreciated, but I'll aim to get docs updated
this week.  There's a number of other properties too, including important
things like JMX-sampling interval, the startup delay, the JMX connection
info for proxying now of course, and other things.  We'll get there.

cheers.

--
Nathan

-=-=-=-=-=-=-=-=-=-=-=-
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 (#14553): https://groups.io/g/pcp/message/14553
View All Messages In Topic (15): 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.