Re: Parfait and UoM (java) RPM packages
"Nathan Scott" <[email protected]>
| Newsgroups | gmane.comp.sysutils.pcp |
|---|---|
| Message-ID | <[email protected]> |
Heya Marko, ----- Original Message ----- > Hi, > > 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. Thanks! > 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: Definitely - there's lots we can simplify here too based on your findings so far ... > 1. Install PCP, enable pmcd, make sure MMV is on, and metrics ok > # dnf install pcp pcp-doc pcp-system-tools > # systemctl enable --now pmcd > # pcp | grep mmv > # pminfo -f mem.util.free > # pminfo mmv | wc -l > 3 > > 2. Install Java if needed, check it works > # dnf install java-1.8.0-openjdk-headless > # java -cp . HelloWorld (I think we should install some sample/demo programs, too, so people don't have to write their own like you have here just to try it out - will look into that shortly. Suyash, one of our GSoC students, has actually prepared a few already - just need to merge those into the maven world Parfait live in so we can ship 'em). > 3. Install Parfait from the Copr repo > # dnf copr enable nathans/pcp.io > # dnf install parfait > > (This adds 29 packages using 22 MB, seems ok.) We may be able to do better too - it looks like at least half of that is coming from dependencies that we don't need to install for the part of Parfait being used here... $ rpm -qi parfait | grep Size Size : 10473178 Collectively, the unitsofmeasurement modules are a few tens of K, which is fine but its the other (Parfait API) things like spring, guava and so on (and their dependencies) that get us to that 20+MB point. But parfait-agent is standalone - we can make a parfait-agent sub-package without those dependencies which will get us to a single package install, with only deps on the jvm itself I think - should get us to approx 10MB. > 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 As mentioned on IRC, I think this is a packaging botch re the specific parfait-agent.jar file that ends up in the rpm - multiple jars are built but we don't use the correct one. Will fix up on the next build. > 4. Start a Java application with the agent > > # java -cp .:/usr/share/java/parfait > -javaagent:/usr/share/java/parfait/parfait-agent.jar > > Here we get an error message that can be ignored but probably should be > addressed in the jar (or not, see below): > > ERROR StatusLogger No log4j2 configuration file found. Using default > configuration: logging only errors to the console. Yep, there's definitely improvements to be made to logging, independent of the WildFly issue below. I'll chat with TallPaul, he's a log4j guru and will likely have lots of good advice to offer here. > So overall looks very promising, after fixing the few minor hickups and > getting the packages included in the real repos we're getting quite > close. The only notable concerns are that there are very few metrics, For now, I've just gone with the original set I was given, from Paul - I know they had per-thread stats tho, so I'll follow up on that. But yes, definitely alot of scope for starting to classify the missing metrics now with correct PCP metric metadata. Still need tools to help - maybe there is a future GSoC project in that. > [...] I wasn't > able to run the application (WildFly 10) after enabling the agent: This looks like https://issues.jboss.org/browse/WFLY-3152 https://bugzilla.redhat.com/show_bug.cgi?id=1037970 There's a workaround mentioned there, to add: -Djava.util.logging.manager=org.jboss.logmanager.LogManager to the command line before presenting the parfait-agent jar options. If that resolves it, there may be some things we can do (in the code) to avoid this automatically. Thanks Marko, appreciate the open mind you're bringing. Also mentioned on IRC earlier, we could also now think about a parfait-jmxscanner module (or some better name) that implements that jmx-pcp concept of being able to find new JVMs on-the-fly and proxy them. With the way Parfait code is organised, this utility could be packaged such that it depends on the JDK (not JRE) while parfait-agent and co don't. But still sharing all the metric definitions, MMV writing, proxying and so on via parfait jars. Another possible GSoC project there perhaps. 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 (#14552): https://groups.io/g/pcp/message/14552 View All Messages In Topic (14): 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 -=-=-=-=-=-=-=-=-=-=-=-