Newbie on Linux tracing question

Questions about YourKit Java Profiler
Post Reply
RandiEck
Posts: 2
Joined: Fri Aug 11, 2017 8:23 pm

Newbie on Linux tracing question

Post by RandiEck »

I'm running on Linux, with ssh access for now. One transaction of our tomcat based app is taking an inordinate amount of time. I would like to get a full trace/profile of the transaction, including our jsp thru the jdbc to mysql and back.

What would the CATALINA_OPTS be in /etc/tomcat6/tomcat6.conf? I tried .../libyjpagent.so=tracing, thinking that the AUTO probes would work, but I'm only getting exceptions in the yjp log file. The default probes are registered, but not turning on. Or do I need to do .../libyjpagent.so=probe_on=* ? Or??

And do I need to run a console on Windows? (Because there's a hint in the logfile that to get the profiling results, I need to connect to the app from the profiler UI.)

TIA.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Newbie on Linux tracing question

Post by Anton Katilin »

Hi,
What would the CATALINA_OPTS be in /etc/tomcat6/tomcat6.conf? I tried .../libyjpagent.so=tracing,
Instead of enabling profiling manually you may use the console wizard:
https://www.yourkit.com/docs/java/help/ ... remote.jsp
thinking that the AUTO probes would work,
Yes, if you start CPU profiling, either tracing or sampling.
but I'm only getting exceptions in the yjp log file. The default probes are registered, but not turning on.
Could you please provide the log file.
Or do I need to do .../libyjpagent.so=probe_on=* ? Or??
No, if you start CPU profiling immediately - see above.
And do I need to run a console on Windows? (Because there's a hint in the logfile that to get the profiling results, I need to connect to the app from the profiler UI.)
You may connect remotely from the profiler UI, but do not have to:
https://www.yourkit.com/docs/java/help/ ... filing.jsp

However, I would first recommend to connect from the profiler UI instead of profiling offline. Using the UI is the simplest way to profile.

Also, please consider CPU sampling instead of CPU tracing. In most cases, CPU sampling results are sufficient and the impact on profiled application is minimal.

Best regards,
Anton
RandiEck
Posts: 2
Joined: Fri Aug 11, 2017 8:23 pm

Re: Newbie on Linux tracing question

Post by RandiEck »

I followed your suggestion of using the profiler UI. I now get the information that I was looking for. (On the other hand, I still can't figure out what's causing a 20 second "Working ..." for something that should take <1 second. Oh well.)
Post Reply