Start JRA recording programatically

There are small sections of my programs I'd like to profile using JRMC. Is there a way to start and stop inside a program a JRA recording?
Erik.

To get reliable profiling data you need a recording of at least 5-10 seconds(probably more), otherwise you'll no get enough samples. The easiest way to start a JRA-recording programatically is by using JMAPI and invoking the diagnostic command "startjrarecording".
Here I'm start a recording with the maximum sample frequency for a maximum of 60 seconds..
JVMFactory.getJVM().getDiagnosticCommand().execute("startjrarecording","sampletime=1, recordingtime=60, filename=myrecording.jra");
JVMFactory.getJVM().getDiagnosticCommand().execute("stopjrarecording","");
For other recording options see JROCKIT_HOME\bin\jrcmd <pid> help startjrarecording. If you just want to time a couple method invocations accurately you should try the Method Profiler in the Management Console.
Kind Regards
Erik

Similar Messages

  • Problem starting JRA recording in Mission Control

    Hi all,
    I have a local weblogic 10.1 installed in my computer, when i tried to get start JRA recording it produces an error, here is the trace of the error:
    Could not open JRA for Create JRA-recording on (1.5) weblogic.Server (2840).
    javax.management.RuntimeMBeanException: RuntimeException thrown in operation start
    javax.management.RuntimeMBeanException: RuntimeException thrown in operation start
         at com.sun.jmx.mbeanserver.StandardMetaDataImpl.wrapRuntimeException(StandardMetaDataImpl.java:994)
         at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(StandardMetaDataImpl.java:430)
         at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
         at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1408)
         at javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81)
         at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1245)
         at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1341)
         at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:782)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
         at sun.rmi.transport.Transport$1.run(Transport.java:153)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
         at java.lang.Thread.run(Thread.java:595)
         at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
         at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
         at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown Source)
         at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:972)
         at com.jrockit.console.rjmx.RJMXConnection.invokeOperation(RJMXConnection.java:432)
         at com.jrockit.console.rjmx.AbstractServerOperations.invokeMethodWithException(AbstractServerOperations.java:110)
         at com.jrockit.console.rjmx.JMXR27Operations.startJRARecording(JMXR27Operations.java:60)
         at com.jrockit.mc.jra.ui.wizards.RecordingJob.startRecording(RecordingJob.java:195)
         at com.jrockit.mc.jra.ui.actions.StartJRA$1.preConnect(StartJRA.java:50)
         at com.jrockit.mc.browser.utils.PreConnectJob.run(PreConnectJob.java:73)
         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    Caused by: java.lang.RuntimeException: java.lang.IllegalAccessException: Your license does not allow JRA to be started: Error: license signature validation error.
    Please check http://www.jrockit.com/
         at bea.jmapi.DiagnosticCommandImpl.execute(DiagnosticCommandImpl.java:54)
         at com.bea.jvm.DiagnosticCommand.execute(DiagnosticCommand.java:234)
         at com.bea.jvm.DiagnosticCommand.execute(DiagnosticCommand.java:253)
         at com.bea.jvm.DiagnosticCommand$Command.execute(DiagnosticCommand.java:349)
         at com.bea.jvm.DiagnosticCommand$Command.execute(DiagnosticCommand.java:377)
         at bea.jrockit.management.JRARecording.<init>(JRARecording.java:79)
         at bea.jrockit.management.JRA.start(JRA.java:88)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(StandardMetaDataImpl.java:414)
         at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
         at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1408)
         at javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81)
         at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1245)
         at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1341)
         at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:782)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
         at sun.rmi.transport.Transport$1.run(Transport.java:153)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.IllegalAccessException: Your license does not allow JRA to be started: Error: license signature validation error.
    Please check http://www.jrockit.com/
         at bea.jmapi.DiagnosticCommandImpl.execute(Native Method)
         at bea.jmapi.DiagnosticCommandImpl.execute(DiagnosticCommandImpl.java:50)
         ... 29 more
    Somebody knows what can be the problem ??
    Thanks.
    Edited by: user10798842 on 15-ene-2009 7:48

    "Caused by: java.lang.RuntimeException: java.lang.IllegalAccessException: Your license does not allow JRA to be started: Error: license signature validation error."
    For the version of JRockit that you are running, you need to have a license file to run JRockit Mission Control.
    Information about how to find a license file can be found here
    In the normal case, you will get better and faster response to JRockit Mission Control questions if you ask them in the JRMC Forum
    Good luck,
    Tomas

  • Error when starting JRA recording

    Hello! I get an error when I try to use the JRARecordingStarter.
    I'm running JBoss with a JRockit and set the -Xmanagement option. The management port is set to 7091.
    Then I try
    java -jar JraRecordingStarter.jar localhost 7091 d:/sednajra.xml 120
    and it gives me the following error after a while:
    Failed to start recording...
    com.jrockit.common.rmp.JRockitNotAnRmpServerException: Handshaking with JRockit failed due to timeout waiting on server reply.
    (Encapsulated exception: Connection lost to JRockit. Reason: RMP reply timed out for packet 'HELO'.)
    at com.jrockit.console.connection.RmpConnection.handshake(RmpConnection.java:175)
    at com.jrockit.console.connection.RmpConnection.<init>(RmpConnection.java:149)
    at com.jrockit.jra.starter.JraConnectorModel.connect(JraConnectorModel.java:168)
    at com.jrockit.jra.starter.JraRecordingStarter.main(JraRecordingStarter.java:63)
    === Encapsulated exception ===
    com.jrockit.common.rmp.JRockitRmpPacketTimeOutException: Connection lost to JRockit. Reason: RMP reply timed out for packet 'HELO'.
    at com.jrockit.console.connection.RmpConnection.getReplyPacket(RmpConnection.java:392)
    at com.jrockit.console.connection.RmpConnection.sendRmpWithReply(RmpConnection.java:343)
    at com.jrockit.console.connection.RmpConnection.handshake(RmpConnection.java:165)
    at com.jrockit.console.connection.RmpConnection.<init>(RmpConnection.java:149)
    at com.jrockit.jra.starter.JraConnectorModel.connect(JraConnectorModel.java:168)
    at com.jrockit.jra.starter.JraRecordingStarter.main(JraRecordingStarter.java:63)
    Do I make a mistake here?
    Thanks!
    stephan

    Don't bother... Version conflict. Updated jrockit and it works now.

  • License installed: Memleak & JRA Recording still don't work on remote srv

    This a JRockit 28.1.1 version on a remote server.
    As noted, a "LIC-JRMC50" license has been installed into its jre, but the memory leak and jra recording functions from the local xp based Mission Control 3.0.5 still don't work.
    The connector to the remote server is working, as I can open console and see its workings.
    When attempting to start Memory Leak an error is shown:
    Caused by: javax.management.InstanceNotFoundException: bea.jrockit.management:type=MemLeak
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
    When trying to start JRA Recording a message is shown that says something like "No Options could be retrieved for this connector. Make sure you're connected to a Jrockit instance..".
    Any suggestions would be appreciated.

    JRockit 28.1.1 should work better with Mission Control 4.0.1 (which should be bundled together with JRockit R28.1.1)
    JRockit 27 versions use JRA, JRockit 28 versions use FlightRecorder instead.
    Mission Control 4.0.1 requires not license file.
    Klara, Mission Control QA

  • Running JRA recording with Weblogic running as a service

    Is it possible to run JRA recording while running the WebLogic application server as a service?
    The spec for our environment is as follows:
    - JRockit JVM version: JRRT 3.1.0 1.4.2
    - Weblogic version: 8.1 SP6
    - OS: Windows XP SP3
    Ideally, we would like to be able to run JRA recording every hour as an automated process, however as there is no java.exe process to attach to it seems this might not be a possibility? I appreciate is certainly possible to run the application as a console application and attach to the PID of a running java process using JRCMD if WebLogic is not running as a service. Are there any solutions for taking JRA recordings when JRockit is running in a Weblogic Service?

    Tim,
    You can try to run beasvc.exe in debug mode, from a command prompt after the
    server is booted. You can run it by: >beasvc -debug ...
    This will simulate the service being started in the foreground so that you can
    see output messages. You may be trying to run beasvc in a way that is not
    intended. If you continue to have issues, you should open a case with BEA
    Support.
    Regards,
    Glenn
    Developer Relations Engineer
    BEA Support
    Tim Isenhart wrote:
    I want to collect performance data from weblogic running as a service. I
    customized the commandline in the installSvc script and inserted a profiler
    class in front of weblogic.Server.
    When i start the service, beasvc crashes.
    How can i work around this without resorting to running a manual script ?
    Thx,
    Tim

  • Unable to generate jra recorder file from java command line.

    Following the instructions at
    http://e-docs.bea.com/wljrockit/docs142/userguide/jra.html#1056021 I'm using
    the following command line to launch my application:
    java -cp bin -Xnoclassgc -Djrockit.lockprofiling -XXjra MyClass
    I'm getting a file lprofile.txt, but no XML file containing the jra
    recording.
    Is the documentation correct?
    jrockit version: BEA WebLogic JRockit(TM) 1.4.2_04 JVM
    Windows XP IA32
    Michael Giroux

    Helena,
    Thanks
    You need to give some parameters to the -XXjra commandNow that I re-read the doc, I see that delay is required. All other
    parameters are optional. I did not notice that the delay has no default
    value. Maybe you could add that to the documentation to make it more clear
    that -XXjra:delay=xx is a minimum requirement.
    Michael
    "Helena Åberg Östlund" <[email protected]> wrote in message
    news:40ff72b4$1@mail...
    Michael,
    You need to give some parameters to the -XXjra command or JRockit will not
    know when to start the recording etc. Parameters are separated by : as
    described in the documentation so the docs are correct. Some valid
    parameters would be for example:
    -XXjra:delay=45,recordingtime=120,filename=myrecording.xml
    which means "start a recording of length 120 seconds in 45 seconds after
    JVM startup. Write the data to the file myrecording.xml".
    I hope this helps.
    /Helena
    Michael Giroux wrote:
    Following the instructions at
    http://e-docs.bea.com/wljrockit/docs142/userguide/jra.html#1056021 I'm
    using the following command line to launch my application:
    java -cp bin -Xnoclassgc -Djrockit.lockprofiling -XXjra MyClass
    I'm getting a file lprofile.txt, but no XML file containing the jra
    recording.
    Is the documentation correct?
    jrockit version: BEA WebLogic JRockit(TM) 1.4.2_04 JVM
    Windows XP IA32
    Michael Giroux

  • Unable to open JRA recording in R27.4.0

    I've made a JRA recording of an application I'm attempting to optimize. The recording file contains data, and looks complete, but when I attempt to open it from Mission Control, all I see is a new, competely empty tab labelled "JRA Editor". No error messages.
    Can anyone offer any suggestions?
    Using JRockit R27.4.0 on Ubuntu Edgy Eft (6.10).

    I upgraded to Ubuntu 7.10 and was still unable to open JRA recordings in Mission Control. I did start getting an error message on exit, so I tracked down the JRMC log file (~/.missioncontrol/.metadata/.log or Help... About... Configuration Details... View Error Log) and discovered it contained:
    java.lang.NoClassDefFoundError: com/jrockit/mc/jra/ui/initialization/IUserInterfaceLog
    Looking at the configuration details I realized that there was information related to JRMC in ~/.eclipse/com.jrockit.mc.rcp.application.product_/. My guess is that the configuration for the Eclipse plugins that form JRMC was somehow corrupted. So I quit JRMC, deleted ~/.eclipse/com.jrockit.mc.rcp.application.product_ and now I'm able to load JRA files.
    I'm guessing this was probably the problem under Ubuntu 6.10, as well.

  • Is it possible to start a recording from source code?

    Hi everybody!
    I'm currently using JProfiler in combination with JUnit tests to collect resource consumption metrics of features in our product.
    A homemade JUnit runner starts and stops the JProfiler recording and parses the recorded data. It then compares the recorded values to predefined limits and fails the test if they are exceeded.
    Now I want to change this to use the flight recorder instead. I found a nice article explaining how to parse .jfr files here: Using the Flight Recorder Parsers | Marcus Hirt
    Unfortunately I can't figure out how to start and stop a flight recording from a JUnit runner besides using the jcmd tool.
    Can anybody help me out?
    Thanks a lot
    Tobias

    Answering myself once more since other people might stumble upon the same problem.
    In the end I created a TestRule which I can add to the JUnit Test Class.
    The interesting parts of the code are:
    public class ProfilerTest implements TestRule {
        @Override
        public Statement apply(Statement base, Description description) {
            return new PerformanceLimitsStatement(base, description);
        class PerformanceLimitsStatement extends Statement {
            private PublicFlightRecorderRunner runner;
            private final Description description;
            private final Statement base;
            public PerformanceLimitsStatement(Statement baseParam, Description descriptionParam) {
                description = descriptionParam;
                base = baseParam;
            @Override
            public void evaluate() throws Throwable {
                runner = new FlightRecorderRunner(description.getTestClass());
              // start profiling
                runner.startupProfiling("jfr/"+description.getTestClass().getSimpleName()+"."+description.getMethodName()+".jfr", annotation.cpuRecording(), annotation.allocRecording(), annotation.methodStatsRecording(), annotation.monitorRecording(),
                        annotation.threadProfiling());
                // run a test method including its before and after methods inside a simple time measurement
                base.evaluate();
                // shutdown profiling
                final File performanceSnapshot = runner.shutdownProfiling(description);
    This uses a PublicFlightRecorderRunner - code:
    import java.io.File;
    import java.io.IOException;
    import java.lang.management.ManagementFactory;
    import java.nio.file.Files;
    import java.util.List;
    import javax.management.Attribute;
    import javax.management.MBeanServer;
    import javax.management.MalformedObjectNameException;
    import javax.management.NotCompliantMBeanException;
    import javax.management.ObjectName;
    import javax.management.openmbean.CompositeData;
    import javax.management.openmbean.CompositeDataSupport;
    import org.junit.internal.runners.statements.InvokeMethod;
    import org.junit.runner.Description;
    import org.junit.runners.BlockJUnit4ClassRunner;
    import org.junit.runners.model.FrameworkMethod;
    import org.junit.runners.model.InitializationError;
    import org.junit.runners.model.Statement;
    * <p>
    * (c) Copyright Vector Informatik GmbH. All Rights Reserved.
    * </p>
    * @since 1.0
    @SuppressWarnings({ "restriction"})
    public class PublicFlightRecorderRunner extends BlockJUnit4ClassRunner implements
            IProfilerRunner {
          private static MBeanServer ms = null;
          private File file;
          private static final String REGISTER_MBEANS_OPERATION = "registerMBeans"; //$NON-NLS-1$
          private static final String JFR_CREATE_RECORDING_OPERATION = "createRecording"; //$NON-NLS-1$
          private static final String START_RECORDING_OPERATION = "start"; //$NON-NLS-1$
          private static final String STOP_RECORDING_OPERATION = "stop"; //$NON-NLS-1$
          private static final String CLOSE_RECORDING_OPERATION = "close"; //$NON-NLS-1$
          private static final String SET_EVENT_ENABLED_OPERATION = "setEventEnabled"; //$NON-NLS-1$
          private static final String SET_STACKTRACE_ENABLED_OPERATION = "setStackTraceEnabled"; //$NON-NLS-1$
          private static final String SET_THRESHOLD_OPERATION = "setThreshold"; //$NON-NLS-1$
          private static final String SET_PERIOD_OPERATION = "setPeriod"; //$NON-NLS-1$
          private static final String MC_CLASS_NAME = "com.sun.management.MissionControl"; //$NON-NLS-1$
          private static final String MC_MBEAN_NAME = "com.sun.management:type=MissionControl"; //$NON-NLS-1$
          private static final ObjectName MC_OBJECT_NAME = createObjectName(MC_MBEAN_NAME);
          private static final String FRC_CLASS_NAME = "oracle.jrockit.jfr.FlightRecorder"; //$NON-NLS-1$
          private static final String FRC_MBEAN_NAME = "com.oracle.jrockit:type=FlightRecorder";
          private static final ObjectName FRC_OBJECT_NAME = createObjectName(FRC_MBEAN_NAME);
          private static ObjectName recordingObjectName;
          private static CompositeDataSupport recording;
          private static ObjectName createObjectName(String beanName) {
              try {
                  return new ObjectName(beanName);
              } catch (MalformedObjectNameException e) {
                  throw new Error("Should not be possible: Could not make a new ObjectName " + beanName); //$NON-NLS-1$
         * Constructor for FlightRecorderRunner.
         * @param klass
         * @throws InitializationError
        public PublicFlightRecorderRunner(final Class<?> klass)
                throws InitializationError {
            super(klass);
        @Override
        protected Statement methodInvoker(final FrameworkMethod method,
                final Object test) {
            return new InvokeMethod(method, test) {
                @Override
                public void evaluate() throws Throwable {
                    final String targetFile = "jfr/" + method.getClass().getSimpleName()
                            + "." + method.getMethod().getName() + ".jfr";
                    startupProfiling(targetFile);
                    for (int i = 0; i < 10; i++) {
                        super.evaluate();
                    shutdownProfiling(method, test);
        public void startupProfiling(final String targetFile) {
            file = new File(targetFile);
            try {
                createFlightRecordingClient(file.getName());
                startFlightRecording(file);
            } catch (Exception e) {
                e.printStackTrace();
        public File shutdownProfiling(final FrameworkMethod method,
                final Object test) {
            try {
                stopFlightRecording();
            } catch (Exception e) {
                e.printStackTrace();
            return file;
        public static void createFlightRecordingClient(
                final String recordingName) throws Exception  {
            // register Flight Recorder Bean
            ms = ManagementFactory.getPlatformMBeanServer();
            // Create MissonControl Bean
            if (!ms.isRegistered(MC_OBJECT_NAME)) {
                ms.createMBean(MC_CLASS_NAME, MC_OBJECT_NAME);
                ms.invoke(MC_OBJECT_NAME, REGISTER_MBEANS_OPERATION, new Object[0],    new String[0]);
            // Create FlightRecorder Bean
            try{
                if(!ms.isRegistered(FRC_OBJECT_NAME))
                    ms.createMBean(FRC_CLASS_NAME, FRC_OBJECT_NAME);
                    ms.invoke(FRC_OBJECT_NAME, REGISTER_MBEANS_OPERATION, new Object[0], new String[0]);
            catch (NotCompliantMBeanException e) {
                @SuppressWarnings("unused")
                boolean wedontcare = true;
            // create recording
            ms.invoke(FRC_OBJECT_NAME, JFR_CREATE_RECORDING_OPERATION, new Object[] {recordingName}, new String[] {String.class.getName()});
        public static void startFlightRecording(File file)
                throws Exception {
            // Check that only one recording exists and that it's not already running
            @SuppressWarnings("unchecked")
            List<CompositeDataSupport> recordings = (List<CompositeDataSupport>) ms.getAttribute(FRC_OBJECT_NAME, "Recordings");
            if(recordings.size() > 1) {
                throw new Error("More than one recording available");
            recording = recordings.get(0);
            if( (boolean) recording.get("running")) {
                throw new Error("Recording is already running");
            // store the recording name for later us
            recordingObjectName = (ObjectName) recording.get("objectName");
            // set duration for the recording
            final long duration = 10 * 60 * 1000; // 10 minutes in milliseconds - this number was determined by looking at the slowest test on jenkins
            final Attribute durationAttribute = new Attribute("Duration", duration);
            ms.setAttribute(recordingObjectName, durationAttribute);
            // set destination for the recording
            try {
                Files.createDirectories(file.getParentFile().toPath());
                final Attribute destinationAttribute = new Attribute("Destination", file.getAbsolutePath());
                ms.setAttribute(recordingObjectName, destinationAttribute);
            } catch (IOException e) {
                e.printStackTrace();
            // read event settings
            @SuppressWarnings("unchecked")
            List<CompositeDataSupport> eventSettings = (List<CompositeDataSupport>) ms.getAttribute(recordingObjectName, "EventSettings");
            final long period = 0;
            final long threshold = 100 * 1000 * 1000; // 100 ms - given in ns
            // enable all events, set threshold to 100ms and stacktrace to false (because we only parse this in code)
            for(CompositeData eventSetting: eventSettings) {
                final Integer eventid = (Integer) eventSetting.get("id");
                ms.invoke(recordingObjectName, SET_EVENT_ENABLED_OPERATION, new Object[] {eventid, true}, new String[] {int.class.getName(), boolean.class.getName()});
                ms.invoke(recordingObjectName, SET_STACKTRACE_ENABLED_OPERATION, new Object[] {eventid, false}, new String[] {int.class.getName(), boolean.class.getName()});
                ms.invoke(recordingObjectName, SET_PERIOD_OPERATION, new Object[] {eventid, period}, new String[] {int.class.getName(), long.class.getName()});
                ms.invoke(recordingObjectName, SET_THRESHOLD_OPERATION, new Object[] {eventid, threshold}, new String[] {int.class.getName(), long.class.getName()});
            // start the recording
            ms.invoke(recordingObjectName, START_RECORDING_OPERATION, new Object[0], new String[0]);
        public static void stopFlightRecording() throws Exception {
            // make sure the recording is stopped
            if ((boolean) ms.getAttribute(recordingObjectName, "Stopped")) {
                throw new Error("The FlightRecording has already stopped in current thread. Consider increasing the duration!");
            } else {
                ms.invoke(recordingObjectName, STOP_RECORDING_OPERATION, new Object[0], new String[0]);
            // close the recording to remove it from the flightrecorder
            ms.invoke(recordingObjectName, CLOSE_RECORDING_OPERATION, new Object[0], new String[0]);
    This creates a .jfr file which can be used later.
    I parse it in the TestRule to determine if the test violated memory or time limits, in which case the test is failed. (see the link in my first post for information about parsing .jfr files)
    The code may not be the prettiest but so far it's working well.
    Message was edited by: the_qa_guy
    Changed the code to use the JFR bean

  • Start / stop recording from other software?

    I have a setup where three cameras are supposed to start/stop recording based on user interaction in another software. So, is it possible to trigger a recording to start and stop from another software? If so, how can this be done?

    To be honest Im not sure but I dont think so.
    If this is a securitycam setup one way to do it without having to have acces to "endles" storage space is to use one of the free services for webcasting like jtv, ustream, veetle, or livestream. I believe all of them have a privace option so you can enter a securitycode so only you can acces the videos. Its not optimal but it gets the job done. I believe some of them will erase videos after a while though if you dont highlight them for saving.

  • I am running my canon camera on the EOS utility program for mac, and i was wondering if there is a keyboard shortcut to start video recording, instead of using the mouse.

    I am using EOS utility for MAC to run my canon camera at work. I have a foot switch connected to my macbook that allows me to take snapshots with my foot while i work ( i am a dentist and i have my camera hooked to a microscope). the way i did that is by programming a keyboard shortcut that snaps photos on EOS utility, to the foot switch software.
    So my question is: On EOS there is a video recording function, so i was wondering if there is a keyboard shortcut or if i can create a keyboard shortcut for the start/stop record function for video recording..

    Hi
    How much free space do you have on your boot disk ( Macintosh HD)?
    You may also like to add your current OS ;-)
    CCT

  • APIs for Parsing JRA Recording Files (Any documentation?)

    Hi,
    I have a JRF recording file with me and using which i need to generate custom report using any scripting language like PERL or Ruby etc without using JRocket Mission Control. here in my custom script i can use any APIs provided by JRocket to parse JRA recording file and get different statistics data.
    So here i want to know what all APIs does JRockit provides for parsing JRA recordings and getting different statistics data from JRF recordings which can be consumed by some other scripting language and NOT through JRockit Mission Control.
    Please share any documentation link or document having detail of available APIs from JRockit for parsing JRA recordings and getting different statistics data.
    Thanks,
    Piyush

    Just in addition to my previous comment.
    I have JRA flight recording files with me for parsing.
    Thanks,
    Piyush

  • Java to start FMS Record

    I,m a newbie and one of my requirements is to Start the Record of the Stream as soon as the Game Starts. The Game gets the ID from JAVA and our client wants the stream record from JAVA.
    Is it possible to Call Stream.record() from JAVA?Similarly JAVA chould be Able to Stop the Record after the game Finishes.
    Any help on this is appreciated.
    Srini

    There must be java based RTMP SDK.. You should contact Adobe sales team directly..

  • Any http/telnet API to activate camera to start/stop recording?

    Hi all,
    The function is involved in a IoE(Internet of Everything) project for customer.
    A. The action of 'start to record': will be triggered by event, such as when a sensor has detected some smoke in one room. The platform will activate camera by sending telnet/https command.
    B. The action of 'Stop to record and Save': will be used based on duration: After recording for 5 mins, the camera will stop to record and save video into local disk automatically.
    Of course, if VSOM is needed, that will be OK! The question will be: How to start/stop camera recording by VSOM API(http/telnet.)?
    Thanks!
    Ziwei

    Hi! I've tried and I believe your Finesse Workflow is correct.
    The trick is that on AQM you need to have your WFO Workflow Allowing to Record all calls.
    Then to exclude all calls from being recorded, you can use the Inclusion List and make * for Exclude all Patterns for being recorded. Then your Finesse Workflow will work:
    1) All calls are sent to AQM, but are not recorded because of the Excluded Pattern = *
    2) Finesse Workflow only has the power to overwrite the Inclusion List configuration
    3) Finesse Workflow cannot overwrite the AQM Workflow configuration.
    Hope it helps,
    Rui

  • Slow start to recording

    I ran the free trial version of V.4 for a while, and then
    paid for upgrade (I had V3 before). Since paying and entering
    serial number, I've noticed that it takes a very very long time for
    a recording session to start after I select Record--several
    minutes. I believe this was not happening before I entered a serial
    number, and it certainly doesn't happen with V3, which is still
    installed. Another anomaly is that when I finally start to record
    my web application, the recording buttons are visible, but the red
    box is underneath the browser. (I'm trying to record just a part of
    a web app.) In other words I can see the red box only if I move the
    browser (either Firefox or IE 6). One possible wrinkle is I have
    dual monitor display, with Captivate on one monitor, and the
    browser I'm trying to capture in the other.

    Hi Ralph
    Sorry but I'm gonna have to use my favorite F expletive!
    Frapdoodle!
    Well, about the only other thing I can think of to suggest is
    to try deleting the Captivate_v40.dat file. On my XP box it is
    found in this location:
    ?:\Documents and Settings\??\Application Data\Adobe\Adobe
    Captivate
    ?=Installed drive letter
    ??=Your logged in user name
    If you close Captivate, then rename or delete this file and
    restart Captivate a fresh one will be created. Please give this a
    try and see if it helps.
    Cheers... Rick

  • I record some information to some slides but the presentation doesn't start from the 1st one but from the one I started the recording. What should I do?

    I record some information to some slides but the presentation doesn't start from the 1st one but from the one I started the recording. What should I do?
    Also, can I use music as backround to some of the slides, not to all of them as I'd like to play videos on the others?

    I have reinstalled the drivers. I watched it install the realtec and cirrus drivers. Hovering the mouse over the speaker icon says 'speakers: HP'. They are actually 'Creative'. 'Properties' indicates 'IDT High Definition CODEC' and 'This device is working correctly'.
    Driver details gives 'c:\Windows\system32\drivers\dmk.sys'.
    There is still no sound, although the little level meter on the control shows a green bar rising and falling.
    Obviously, it thinks it's working, but there's no connection to the speakers. They're not muted, either. I checked that too.
    Any other ideas?
    Thanks.

Maybe you are looking for