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 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
# 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

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.)

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

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.

5. Check the newly appeared metrics

# pminfo mmv | wc -l
22
# pminfo mmv
mmv.HelloWorld.java.uptime
mmv.HelloWorld.java.timestamp
mmv.HelloWorld.java.memorypool.tenured
mmv.HelloWorld.java.memorypool.survivor
mmv.HelloWorld.java.memorypool.peak.metaspace
mmv.HelloWorld.java.memorypool.metaspace
mmv.HelloWorld.java.memorypool.eden
mmv.HelloWorld.java.memorypool.codecache
mmv.HelloWorld.java.memory.nonheap
mmv.HelloWorld.java.memory.heap
mmv.HelloWorld.java.memory.gc.minor.time
mmv.HelloWorld.java.memory.gc.minor.count
mmv.HelloWorld.java.memory.gc.full.time
mmv.HelloWorld.java.memory.gc.full.count
mmv.HelloWorld.java.jvm_version
mmv.HelloWorld.java.jvm.compilation
mmv.HelloWorld.java.jvm.classloader.unloaded.total
mmv.HelloWorld.java.jvm.classloader.loaded.total
mmv.HelloWorld.java.jvm.classloader.loaded.current
mmv.control.files
mmv.control.debug
mmv.control.reload
# pminfo -f mmv.HelloWorld.java.memorypool.eden

mmv.HelloWorld.java.memorypool.eden
    inst [1491142788 or "committed"] value 17825792
    inst [3237136 or "init"] value 8912896
    inst [107876 or "max"] value 173015040
    inst [3599293 or "used"] value 415784

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,
basics like thread info is missing and, perhaps more importantly, when
trying with a real application instead of the toy HelloWorld, I wasn't
able to run the application (WildFly 10) after enabling the agent:

# grep parfait standalone.sh
JAVA_OPTS="-cp /usr/share/java/parfait
-javaagent:/usr/share/java/parfait/parfait-agent.jar $JAVA_OPTS"
# sh ./standalone.sh
...
  JAVA_OPTS: -cp /usr/share/java/parfait
-javaagent:/usr/share/java/parfait/parfait-agent.jar  -server -Xms64m
-Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m
-Djava.net.preferIPv4Stack=true
-Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
...
WARNING: Failed to load the specified log manager class
org.jboss.logmanager.LogManager
lokakuuta 19, 2016 10:33:52 AP.
org.jboss.msc.service.ServiceContainerImpl <clinit>
INFO: JBoss MSC version 1.2.6.Final
lokakuuta 19, 2016 10:33:52 AP.
org.jboss.as.server.ApplicationServerService start
INFO: WFLYSRV0049: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final)
starting
lokakuuta 19, 2016 10:33:53 AP.
org.jboss.as.controller.AbstractOperationContext executeStep
ERROR: WFLYCTL0013: Operation ("parallel-extension-add") failed -
address: ([])
java.lang.RuntimeException: WFLYCTL0079: Failed initializing module
org.jboss.as.logging
...
Caused by: java.util.concurrent.ExecutionException:
java.lang.IllegalStateException: WFLYLOG0078: The logging subsystem
requires the log manager to be org.jboss.logmanager.LogManager. The
subsystem has not be initialized and cannot be used. To use JBoss Log
Manager you must add the system property "java.util.logging.manager" and
set it to "org.jboss.logmanager.LogManager"
...
Caused by: java.lang.IllegalStateException: WFLYLOG0078: The logging
subsystem requires the log manager to be
org.jboss.logmanager.LogManager. The subsystem has not be initialized
and cannot be used. To use JBoss Log Manager you must add the system
property "java.util.logging.manager" and set it to
"org.jboss.logmanager.LogManager"
...
lokakuuta 19, 2016 10:33:53 AP. org.jboss.as.server.ServerService boot
FATAL: WFLYSRV0056: Server boot has failed in an unrecoverable manner;
exiting. See previous messages for details.
lokakuuta 19, 2016 10:33:53 AP.
org.jboss.as.server.BootstrapImpl$ShutdownHook shutdown
INFO: WFLYSRV0220: Server shutdown has been requested.

(Let's ignore the horribly broken localized messages here :)

Is it possible to address this so that applications can be run with or
without instrumentation without having to resort to application specific
tweaks for either case?

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