Tuesday, December 8, 2009

Typical options for a JRA recording

jrcmd $pid jrarecording nativesamples=false threaddumpinterval=60s latency=false filename=/users/dick/jra.xml.zip time=300

lock analysis is enabled by passing -Djrockit.lockprofiling=true as a parameter to the JVM

the entire help can be obtained like this:

 jrcmd 3863 help startjrarecording
Starts a JRA recording.
        filename           - name of the file to store JRA recording to
                             (string, recording.jra)
        recordingtime      - length of the recording in seconds (int, 60)
        delay              - delay before starting recording in seconds (int,
        methodsampling     - enable method sampling (bool, true)
        gcsampling         - enable gc information (bool, true)
        heapstats          - include heap statistics (bool, true)
        nativesamples      - include native code in sampling (bool, false)
        methodtraces       - include stack traces (bool, true)
        tracedepth         - depth of stack traces (int, 16)
        sampletime         - time between samples in milliseconds (int, 30)
        zip                - zip the recording (bool, true)
        hwsampling         - use hardware sampling if possible (bool, false)
        threaddump         - do full threaddumps at start and end of recording
                             (bool, true)
        threaddumpinterval - also do threaddumps every 'n' interval (can be
                             specified as x[ns|ms|s]) (time, 0s)
        latency            - include latency analysis (bool, false)
        latencythreshold   - do not record events shorter than this number (can
                             be specified as x[ns|ms|s]) (time, 20ms)
        cpusamples         - sample cpu usage during the recording (bool,
        cpusampleinterval  - cpu sample interval (can be specified as
                             x[ns|ms|s]) (time, 1s)

unfortunately, latency=true generates a LOT of data, so you can't do a recording longer than 300 s. Try using  latencythreshold=200ms   

No comments: