Open file with multiple thread dumps in JProfiler - jprofiler

I have a .log file with thread dumps coming from one of our production environments. Inside there are thread dumps saved every 5 minutes for whole day.
This file can be opened with IBM Thread and Monitor Dump Analyzer. When I try to open it in JProfiler (after renaming it .log -> .hprof) it says that format is incorrect.
Does someone know if it's possible to open multi thread dump files in JProfiler ?

As of JProfiler 13, .log files from the IBM JVM cannot be opened in JProfiler. HPROF is a different format.

Related

Tomcat disable catalina.out

In our web application deployed on tomcat, catalina.out file keeps growing (it grows in GB's).
So to disable it I found solution where I set CATALINA_OUT=/dev/null.
This worked as expected but we also use kill -3 <PID> command to capture Thread Dump whenever it requires.
This thread dump gets written into catalina.out file but now I have disabled catalina.out so I cannot see thread dump.
How can I get thread dump?
Since it is a production system therefore we are using JRE and not JDK otherwise we would have used jmap/jcmd/jstack commands to capture thread dump.
So, I would like, tomcat should stop creating catalina.out file or do not write log4j statements in it. And if it is disabled then how to get thread dump?
Finally I found the solution which I was looking for. I added below lines of statement in tomcat/bin/startup.sh file
export CATALINA_OUT=/dev/null
export JAVA_OPTS="$JAVA_OPTS -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=thread_dump.log"
CATALINA_OUT set to /dev/null will stop writing log statements in catalina.out log.
JAVA_OPTS -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=thread_dump.log configurations is used to write thread dump statements generated using kill –3 <PID> command. It will also print JVM-related configuration being used.
I hope this will help someone.

JFR recording analysis: Path in the File I/O report is "null"?

I'm profiling (using JFR's "Continuous" profile settings) a non-trivial production application which does a lot of I/O and I'm surprised that the File I/O report shows only a single row with Path null.
How can I find out why is this happening and fix it?
It's a pretty standard java/clojure app and it runs in a docker container.
This happens when the file stream was created using a file descriptor, for example System.out, System.in and System.err.

Running wrapper file continuously for using JFR to monitor ActiveMQ performance

I have an issue about continuously running Java Flight Recorder to monitor memory usage and other performance statistics of ActiveMQ.
Wrapper configuration file (wrapper.conf) is under this directory with nearside (wrapper, activemq, libwrapper.so) files;
../apache-activemq-5.12.1/bin/linux-x86-64/wrapper.conf
I added the lines below to run JFR;
wrapper.java.additional.13=-XX:+UnlockCommercialFeatures
wrapper.java.additional.14=-XX:+FlightRecorder
wrapper.java.additional.15=-XX:FlightRecorderOptions=defaultrecording=true,disk=true,repository=../jfr/jfrs_%WRAPPER_PID%,settings=profile
wrapper.java.additional.16=-XX:StartFlightRecording=filename=../jfr/jfrs_%WRAPPER_PID%/myrecording.jfr,dumponexit=true,compress=true
When I run wrapper file, expected output 'myrecording.jfr' is generated under specified path in wrapper.conf. But the problem is, I also want it to be happen automatically (without running wrapper file by hand).
What might be the possible solution for that?

Rundeck run job when file is detected

Does anyone know if its possible to have Rundeck (or another open source scheduler) kickoff a job based on a file being detected on it's filesystem?
For ProActive, an open source scheduler, we developed a small script that would allow you to do that and check the changes in a folder for a selected period.
Directory Monitoring Script
Let me know if you have any issue.

Not able to take a thread dump using Jstack.

I want to take a thread dump of my java - Jmeter machine. In my Jmeter machine I can see many of the threads are not closed and stucked after test timings. To debug more I tried to take thread dump(using "jstack -PID>>Fileae.txt" command). but this command is still running after 24Hrs, although this has created a empty textfile.
Why I am not able to take a thread dump of that java process.
Try this -
‘jstack’ is an effective command line tool to capture thread dumps. jstack tool is shipped in JDK_HOMEbin folder. Here is the command that you need to issue to capture thread dump:
jstack -l >
where
pid: is the Process Id of the application, whose thread dump should be captured
file-path: is the file path where thread dump will be written in to.
Example:
jstack -l 37320 > /opt/tmp/threadDump.txt
As per the example thread dump of the process would be generated in /opt/tmp/threadDump.txt file.
Jstack tool is included in JDK since Java 5. If you are running in older version of java, consider using other options.