1

Can someone let me know in Java Flight Control started via Java Mission Control if it is possible to keep only last N minutes of data under continuous recording?

I have gone through this discussion but I am not able to find where I have to pass the disk=true parameter. The options that I have been using looks like below.

enter image description here

Environment:-

  • Java 8
  • Mac OS X
  • Java Mission Control 5.5.1 (M5.5.1-15, 172852)
Kire Haglin
  • 6,569
  • 22
  • 27
tuk
  • 5,941
  • 14
  • 79
  • 162

2 Answers2

1

Please try

java -XX:+FlightRecorder -XX:FlightRecorderOptions=disk=true ... app.java

This will work on JRocket VM.

For Oracle VM you need first to unlock commercial features

java -XX:+UnlockCommericalFeatures -XX:+FlightRecorder -XX:FlightRecorderOptions=disk=true ... app.java

fg78nc
  • 4,774
  • 3
  • 19
  • 32
  • You mean while starting jmc like `jmc -XX:FlightRecorderOptions=disk=true` – tuk Sep 30 '17 at 20:27
  • It is JVM option. Are you on Oracle or JRocket JVM? – fg78nc Sep 30 '17 at 20:28
  • I am on oracle. – tuk Sep 30 '17 at 20:30
  • Not sure, if it is available on Oracle VM, I guess it is a feature of the JRocket VM only. I have edited my answer with full command line. – fg78nc Sep 30 '17 at 20:30
  • The discussion link I have posted in my question is from oracle community there it was mentioned to set `disk=true`. How can I verify if this option is there or not in Oracle JVM? – tuk Sep 30 '17 at 20:35
  • I am giving a file name in the UI. You can see the attached screenshot. Shouldn't this mean that `disk=true`? Do I still have to use `FlightRecorderOptions`? – tuk Oct 01 '17 at 04:47
1

It's only disk recordings that allow you to set maximum age or maximum size. So if you use the wizard in JMC you will get a disk recording by default.

Kire Haglin
  • 6,569
  • 22
  • 27