Any gotcha's for command line export of reports?

Questions about YourKit Java Profiler
Post Reply
Michael.Scaman
Posts: 34
Joined: Mon Feb 02, 2015 3:14 pm

Any gotcha's for command line export of reports?

Post by Michael.Scaman »

I am not seeing what's wrong but neither am I seeing reports generated

I am in the director with the generated snapshots...
/usr/share/tomcat/Snapshots

When I try to expand captured snapshots to folder reports in all formats (which is in the cur dir) I don't see any
java -jar /var/lib/yjp-2014-build-14120/lib/yjp.jar -export Tomcat-2015-03-13.snapshot reports

This is on linux.
Do I need to install the licence I have for the UI? or download something additional?

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

Re: Any gotcha's for command line export of reports?

Post by Anton Katilin »

Do you get any error messages?
Please try full paths instead of relative paths to ensure you know where to expect the results.
Michael.Scaman
Posts: 34
Joined: Mon Feb 02, 2015 3:14 pm

Re: Any gotcha's for command line export of reports?

Post by Michael.Scaman »

ok... no valid license key... maybe you could put in the error message the location to put the licence?

java -jar /var/lib/yjp-2014-build-14120/lib/yjp.jar -export /usr/share/tomcat/Snapshots/Tomcat-2015-03-14-1.snapshot /usr/share/tomcat/Snapshots/reports
[YourKit Java Profiler 2014 build 14120] Log file: /root/.yjp/log/yjp-13005.log
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.yourkit.Main$2.run(a:16)
Caused by: java.lang.ExceptionInInitializerError
at com.yourkit.b.e.try(a:8)
at com.yourkit.g.r.d.a(a:99)
at com.yourkit.Main1.a(a:214)
at com.yourkit.Main1.entry(a:524)
... 5 more
Caused by: java.lang.RuntimeException: No valid license key available
at com.yourkit.api.SnapshotImpl.<clinit>(a:34)
Michael.Scaman
Posts: 34
Joined: Mon Feb 02, 2015 3:14 pm

Re: Any gotcha's for command line export of reports?

Post by Michael.Scaman »

I have a UI on windows with my key

do I have to put it in one spot and maybe ftp the files to that spot to export with my key?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Any gotcha's for command line export of reports?

Post by Anton Katilin »

Yes, you need the license key to use the export functionality.

Please put the license key to <user home>/.yjp/license-key-1.txt under the same user as you run the export command.
Michael.Scaman
Posts: 34
Joined: Mon Feb 02, 2015 3:14 pm

Re: Any gotcha's for command line export of reports?

Post by Michael.Scaman »

OK, that works. Thanks

Which reports files would one look in for exception reports or deadlock detection ? Any way of seeing them broken out like the tabs in the UI? or is that only through the UI?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Any gotcha's for command line export of reports?

Post by Anton Katilin »

Exceptions and deadlocks are not exported. They are available in the UI only. Furthermore, a deadlock in the corresponding tab, if detected, is show when the profiler UI is connected to a profiled application but is not stored in a snapshot.
Michael.Scaman
Posts: 34
Joined: Mon Feb 02, 2015 3:14 pm

Re: Any gotcha's for command line export of reports?

Post by Michael.Scaman »

OK... so exceptions and deadlocks would be manual UI from the snapshots ?

but also can be collected using the Controller API in java?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Any gotcha's for command line export of reports?

Post by Anton Katilin »

OK... so exceptions and deadlocks would be manual UI from the snapshots ?
Only exceptions.

Deadlock detector is available only when the profiler UI is connected to a running profiled application. This information is not available in snapshots (not stored to).

Instead, in a snapshot, you can analyze thread states in Threads. If you find that some threads are blocked forever, you may suspect a deadlock.
but also can be collected using the Controller API in java?
Controller can capture snapshots. If exception recording is on, the results will be in the snapshot.
Post Reply