All Apps and Add-ons

can we do profiling with this app?

rahulsanjose
Explorer

I am wondering if we can do some profiling with this app.

I would like to know if there is a way to know what are the top 10 objects that are being collected the most,etc.

Damien_Dallimor
Ultra Champion

Via Splunk4JMX , you have access to several Garbage Collection, Memory Pool and Memory Manager metrics from the core java.lang MBean domain.

But if you want deeper profiling information ie: Object/Class histograms ,leak detection, fine grained memory usage, collection stats etc.. you'd have to dump an hprof file from the JVM and analyse this with something like Eclipse MAT.

You could however use Splunk4JMX to invoke an operation via JMX to dump this hprof file.
The com.sun.management:type=HotSpotDiagnostic Mbean exposes an operation called dumpHeap.

So you could create a config.xml file for Splunk4JMX that invokes this operation, setup the invocation frequency in Splunk(every hour, every day etc..),but then you'd need a custom data collector to monitor this hprof dump file, parse it from its binary format(the spec is online), index it and then use Splunk as a fully fledged JVM memory profiling tool.

PS: dumping an hprof file is an expensive operation and can potentially negatively affect your running application.

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...