Small set of tools for JVM troublshooting, monitoring and profiling.

Related tags

Profilers jvm-tools
Overview

Swiss Java Knife (SJK)

SJK is a command line tool for JVM diagnostic, troubleshooting and profiling.

SJK exploits standard diagnostic interfaces of JVM (such as JMX, JVM attach and perf counters) and adds some more logic on top useful for common troubleshooting cases. SJK can also be used as a library for building application specific diagnostic tools or to enhance your code with self monitoring features.

What you can do with SJK?

See full command reference.

Download

Latest prebuild binaries Last Version

Starting sjk

java -jar sjk.jar <cmd> <arguments>
java -jar sjk.jar --commands
java -jar sjk.jar --help <cmd>

Below a few command from SJK (full command reference).

ttop

Pools thread CPU usage of the target JVM and periodically reports to the console.

  • can attach via PID or open JMX port
  • displays thread memory allocation rate and cumulative process allocation rate
  • displays safe point time consumption (only if attache via PID)

More details

hh

Similar to jmap -histo.

  • plus can show a histogram of dead objects (histograms of all and live requested, then difference is calculated)
  • plus can show N top buckets in histogram

More details

stcap, stcpy, ssa and flame

These commands provide basic sample profiler capabilities. stcap produces hyper-dense stack trace dump (about 1000 compression rate compared to text format) and ssa provides few reports over dump files. stcpy can copy data in archives produced by stcap (e.g. merging dumps or filtering selected threads).

So far following reports are available:

  • sophisticated filtering (time, stack trace, thread name)
  • stack frame histogram with advanced filtering options
  • flame graph visualization (SVG or interactive HTML)
  • per thread summary (CPU usage, memory allocation, etc)
  • converting back to text format

Dump file can be also processed programatically.

More details

mx

This command allows you to do basic operations with MBean from command line.

It can:

  • read MBean attributes
  • update MBean writeable attributes
  • invoke MBean operations (arguments are supported)
  • display composite and tabular data in a human readable format
  • use wild cards to shorten MBean names (e.g. *:*,name=CodeCacheManager instead of java.lang:type=MemoryManager,name=CodeCacheManager)
  • connect to local JVM processes by PID (e.i. any Java process, you do not need to enable JMX server)
  • connect to JMX using host:port (password authentication is supported)

More details

jps

Similar to jps from JDK.

  • plus can display specific system properties of process in output
  • plus can display values of specific -XX for HotSpot JVM processes
  • plus can filter process java processes by their system properties

More details

gc

Report information about GC in real time. Data is retrieved via JMX.

More details

mxdump

Dumps all MBeans of target java process to JSON.

Comments
  • Failed to add tools.jar to classpath

    Failed to add tools.jar to classpath

    Java home points to D:\fuck\jdk1.8 make sure it is not a JRE path Failed to add tools.jar to classpath java.lang.ClassNotFoundException: com.sun.tools.attach.VirtualMachine at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.gridkit.lab.jvm.attach.AttachAPI.(AttachAPI.java:45) at org.gridkit.lab.jvm.attach.AttachManager.(AttachManager.java:73) at org.gridkit.jvmtool.cmd.ProcListCmd$JPS.run(ProcListCmd.java:74) at org.gridkit.jvmtool.cli.CommandLauncher.start(Comman

    .... but i can't undertand why?

    opened by 941112341 12
  • error while trying to access java program

    error while trying to access java program

    so while trying to use ttop I get a error strange thing is that jps detects it...

    thanks RF

    rferreira@graylog1-cab2:~$ sudo java -jar sjk-plus-0.4.2.jar jps
    25987   sjk-plus-0.4.2.jar jps
    23691   /usr/share/graylog-server/graylog.jar server -f /etc/graylog/server/server.conf -np
    rferreira@graylog1-cab2:~$ sudo java -jar sjk-plus-0.4.2.jar ttop -p 23691 -n 20 -o CPU
    Failed to access MBean server: 23691
    
    opened by rsff 8
  • retained size of objects issue

    retained size of objects issue

    I'm trying to use your nice library in order to compute the retained size of an object, because I have a huge hprof file.

    I used HeapFactory.createHeap(), because I see that getRetainedSize() is not implemeted for FastHprofHeap.

    It works, the only thing is that it gives a different result compared with Yourkit or Eclipse Memory Analyzer (those two give the exact same number of bytes each time).

    Example

                    Map<Integer, String> map = new HashMap<>();
    		for (int i = 0; i < numberOfItems; i++) {
    			map.put(i, Integer.toString(i));
    		}
    

    The bigger the numberOfItems, the bigger the difference in retained size between this api and the standard tools. E.g for 5 items, this library returns 730 and Yourkit and EMA return 544 for 10_000 items, this library returns 1,366,404 and Yourkit and EMA return 1,023,568

    Any ideas? Thank you!

    opened by jackmalkovick 6
  • Add more security to MXPR

    Add more security to MXPR

    it would be nice to add more security tomxpr, for example, ability to specify user name & password for remote connection.

    It would be also useful to add SSL, but it could be too much work.

    opened by alexott 5
  • Editable JMX connection string

    Editable JMX connection string

    Hello, Alexey.

    I have a topic to discuss and JMX connection string customization is a subject.

    Recent applications servers, for instance Wildfly, offers JMX connection over http-remoting-jmx. As jvm-tools has RMI hard coded in the connection string at JmxConnectionInfo.java, a code change has to be made in order to change the connection type.

    I need to know your opinion as for customization of a protocol string, mostly designing related question. final String uri = "service:jmx:rmi:///jndi/rmi://" + host + ":" + port + "/jmxrmi";

    Have I to implement customization in one of the preferable ways while using -cp with provider's protocol realization:

    • Override service:jmx:rmi:///jndi/rmi:// with my own hardcoded string service:jmx:remoting-jmx:///jndi/rmi:// while always using WildFly http-jmx interface?
    • Allow for override of JMX protocol string with the property setting via -D flag?
    • Use -s flag value as fully overriding JMX connection string?
    • Add new flag to have a chance to form own JMX connection string?

    Please, let me know if I need to issue a pull request. Thank you for your job!

    opened by kyxap1 5
  • Question about GC CPU Utilization

    Question about GC CPU Utilization

    Hi Alexey,

    Many thanks for this great tool!

    I have a question. I noticed an interesting metric about GC CPU utilization in the output of the 'ttop' tool:

    2016-06-29T15:44:56.789+0200 Process summary process cpu=12.74% application cpu=10.03% (user=9.55% sys=0.47%) other: cpu=2.71% GC cpu=0.05% (young=0.05%, old=0.00%)

    Question: is this the actual amount of CPU that is consumed by the JVM GC threads?

    If so, I wonder where does it come from. I have seen this metric in GC logs (i.e. Times usr= sys=), is it the same? Was not aware that it was exposed also via JMX...

    opened by stefanodoni 4
  • java.rmi.UnmarshalException: error unmarshalling return

    java.rmi.UnmarshalException: error unmarshalling return

    Hi,

    Thanks for a great program. When I try to use the mxdump feature, I run into this (see the error message at the bottom)

    $ java -jar ./scripts/sjk-plus-0.11.jar mxdump -s some-server:30648 
    {
      "beans" : [ {
        // (...a lot of data redacted)
        "name" : "Catalina:type=WebResourceRoot,host=localhost,context=/myapp",
        "modelerType" : "org.apache.tomcat.util.modeler.BaseModelMBean",
        "cachingAllowed" : true,
        "stateName" : "STARTED",
        "trackedResources" : "[]",
        "trackLockedFiles" : false,
        "allowLinking" : true
      }, {
        "name" : "Catalina:type=SSLHostConfig,ThreadPool=\"https-openssl-nio-8443\",name=\"_default_\"",
        "modelerType" : "org.apache.tomcat.util.modeler.BaseModelMBean",
        "certificateChainFile" : null,
        "hostName" : "_default_",
        "enabledProtocols" : [ "TLSv1", "TLSv1.2", "SSLv2Hello", "TLSv1.1" ],
        "disableCompression" : true,
        "truststoreType" : "JKS",
        "certificateRevocationListPath" : null,
        "caCertificatePath" : null,
        "configType" : "EITHER",
        "keyManagerAlgorithm" : "SunX509",
        "truststorePassword" : null,
        "certificateKeyAlias" : null,
        "certificateKeystoreType" : "JKS",
        "trustManagerClassName" : null,
        "honorCipherOrder" : null,
        "ciphers" : "HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!kRSA",
        "disableSessionTickets" : false,
        "certificateVerificationDepthConfigured" : false,
        "truststoreAlgorithm" : "PKIX",
        "certificateRevocationListFile" : null,
        "enabledCiphers" : [ "TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8", "TLS_ECDHE_ECDSA_WITH_AES_256_CCM", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", "TLS_PSK_DHE_WITH_AES_256_CCM_8", "TLS_DHE_PSK_WITH_AES_256_CCM", "TLS_DHE_RSA_WITH_AES_256_CCM_8", "TLS_DHE_RSA_WITH_AES_256_CCM", "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384", "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA", "TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA", "TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA", "TLS_SRP_SHA_WITH_AES_256_CBC_SHA", "TLS_RSA_PSK_WITH_AES_256_CBC_SHA384", "TLS_DHE_PSK_WITH_AES_256_CBC_SHA384", "TLS_RSA_PSK_WITH_AES_256_GCM_SHA384", "TLS_DHE_PSK_WITH_AES_256_GCM_SHA384", "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384", "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_RSA_PSK_WITH_AES_256_CBC_SHA", "TLS_DHE_PSK_WITH_AES_256_CBC_SHA", "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256", "TLS_DHE_RSA_WITH_AES_256_CBC_SHA", "TLS_DHE_DSS_WITH_AES_256_CBC_SHA", "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", "TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384", "TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384", "TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256", "TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256", "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256", "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256", "TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384", "TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384", "TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384", "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256", "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256", "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA", "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA", "TLS_PSK_WITH_AES_256_CCM_8", "TLS_PSK_WITH_AES_256_CCM", "TLS_PSK_WITH_AES_256_CBC_SHA384", "TLS_PSK_WITH_AES_256_GCM_SHA384", "TLS_PSK_WITH_AES_256_CBC_SHA", "TLS_PSK_WITH_CHACHA20_POLY1305_SHA256", "TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8", "TLS_ECDHE_ECDSA_WITH_AES_128_CCM", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", "TLS_PSK_DHE_WITH_AES_128_CCM_8", "TLS_DHE_PSK_WITH_AES_128_CCM", "TLS_DHE_RSA_WITH_AES_128_CCM_8", "TLS_DHE_RSA_WITH_AES_128_CCM", "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256", "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA", "TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA", "TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA", "TLS_SRP_SHA_WITH_AES_128_CBC_SHA", "TLS_RSA_PSK_WITH_AES_128_CBC_SHA256", "TLS_DHE_PSK_WITH_AES_128_CBC_SHA256", "TLS_RSA_PSK_WITH_AES_128_GCM_SHA256", "TLS_DHE_PSK_WITH_AES_128_GCM_SHA256", "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256", "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_RSA_PSK_WITH_AES_128_CBC_SHA", "TLS_DHE_PSK_WITH_AES_128_CBC_SHA", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256", "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA", "TLS_DHE_DSS_WITH_AES_128_CBC_SHA", "TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256", "TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256", "TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256", "TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256", "TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256", "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256", "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256", "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA", "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA", "TLS_PSK_WITH_AES_128_CCM_8", "TLS_PSK_WITH_AES_128_CCM", "TLS_PSK_WITH_AES_128_CBC_SHA256", "TLS_PSK_WITH_AES_128_GCM_SHA256", "TLS_PSK_WITH_AES_128_CBC_SHA", "TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256" ],
        "caCertificateFile" : null,
        "openSslConf" : null,
        "insecureRenegotiation" : false,
        "truststoreProvider" : null,
        "certificateKeyFile" : null,
        "certificateKeystoreFile" : "/var/lib/tomcat8/.keystore",
        "revocationEnabled" : false,
        "certificateKeystoreProvider" : null,
        "sessionCacheSize" : 0,
        "openSslConfContext" : 0,
        "openSslContext" : 140587870744736,
        "certificateKeystorePassword" : "<removed>",
        "objectName" : "Catalina:type=SSLHostConfig,ThreadPool=\"https-openssl-nio-8443\",name=\"_default_\"",
        "sslProtocol" : "TLS",
        "sessionTimeout" : 86400,
        "truststoreFile" : null,
        "certificateFile" : null,
        "certificateVerificationDepth" : 10,
        "certificateKeyPassword" : null
      }, {
        "name" : java.rmi.UnmarshalException: error unmarshalling return; nested exception is: 
    	java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.apache.coyote.RequestGroupInfo
    

    The process in question is a Tomcat 8 process running on Linux.

    Maybe it would be better for SJK to ignore non-serializable objects like org.apache.coyote.RequestGroupInfo? Perhaps logging a message about them if debugging is enabled or something.

    opened by perlun 3
  • Add documentation about connecting to JVMs

    Add documentation about connecting to JVMs

    As a newcomer, I wish I had read some advice to troubleshoot connection between sjk and my app:

    $ java -jar sjk.jar ttop -p <pid>
    Failed to access MBean server: <pid>
    
    • Always use the same user to run sjk as the application: sudo -u elasticsearch java -jar sjk.jar ttop -p <elasticsearch pid> and test the connection with jstack before using sjk
    • Disable firewalls (iptables and the like): even if you're connecting locally using a PID, sockets are still used for communication.

    This would have saved me hours of investigation.

    opened by gquintana 3
  • Does SSA use asyncgetcalltrace or JVMTI getCallTrace to walkthrough Java stack trace

    Does SSA use asyncgetcalltrace or JVMTI getCallTrace to walkthrough Java stack trace

    Team,

    Thanks for creating this project. The tools developed were really useful particularly ssa with flamegraphs. But we would like to know whether ssa uses asyncgetcalltrace(AGCT) or JVMTI getCallTrace to walkthrough Java stack trace. Since AGCT output would be accurate in walking through stack asynchronously not impacted by safepoint bias.

    Sattish.

    opened by sattishv 2
  • String fix for Java 10 (PR 35)

    String fix for Java 10 (PR 35)

    Hi,

    I am using your library in a Java-based OS to find memory leaks automatically.

    One small thing. I believe the library is not fully adapted to Java 10? It generally seems to work, don't get me wrong :+1:

    The issue I have is with the method org.gridkit.jvmtool.heapdump.HeapWalker.stringValue():

        public static String stringValue(Instance obj) {
            if (obj == null) {
                return null;
            }
            if (!"java.lang.String".equals(obj.getJavaClass().getName())) {
                throw new IllegalArgumentException("Is not a string: " + obj.getInstanceId() + " (" + obj.getJavaClass().getName() + ")");
            }
            char[] text = null;
            int offset = 0;
            int len = -1;
            for(FieldValue f: obj.getFieldValues()) {
                Field ff = f.getField();
                if ("value".equals(ff.getName())) {
                    PrimitiveArrayInstance chars = (PrimitiveArrayInstance) ((ObjectFieldValue)f).getInstance();
                    text = new char[chars.getLength()];
                    for(int i = 0; i != text.length; ++i) {
                        text[i] = ((String)chars.getValues().get(i)).charAt(0);
                    }
                }
                // fields below were removed in Java 7
                else if ("offset".equals(ff.getName())) {
                    offset = Integer.valueOf(f.getValue());
                }
                else if ("count".equals(ff.getName())) {
                    len = Integer.valueOf(f.getValue());
                }
            }
    
            if (len < 0) {
                len = text.length;
            }
    
            return new String(text, offset, len);
        }
    

    which clearly is pre-JDK 10 code. Any intention to upgrade this?

    Many greetings, Stefan BotCompany.de

    Edit: In fact, I might just do this myself...

    opened by stefan-reich 2
  • sjk 0.10 doesn't handle jfr.

    sjk 0.10 doesn't handle jfr.

    Locally builded sjk-plus 0.10 or downloaded from maven central doesn't handle java flight recording. Version 0.9.3 works.

    java -jar sjk-0.10.jar ssa -f node.jfr --histo Unable to parse file '.\node.jfr'. Parser config: SJK Thread Dump (Magic: TRACEDUMP_1, TRACEDUMP_2), SJK Genereic Event Dump (Magic: EVENTDUMP_1), JStack dump parser Stream reader error: java.io.IOException: Invalid magic No data

    java -jar sjk-0.9.3.jar ssa -f node.jfr --histo Trc(%) Frm N Term(%) Frame 8 100% 8 0 0% io.netty.util.concurrent.SingleThreadEventExecutor$5.run(line:858) 8 100% 8 0 0% java.lang.Thread.run(line:748) 7 87% 7 0 0% io.netty.channel.nio.NioEventLoop.run(line:408) 4 50% 4 0 0% sun.nio.ch.SelectorImpl.select(line:97)

    opened by ivandasch 2
  • fix(sec): upgrade org.apache.logging.log4j:log4j-core to 2.17.1

    fix(sec): upgrade org.apache.logging.log4j:log4j-core to 2.17.1

    What happened?

    There are 1 security vulnerabilities found in org.apache.logging.log4j:log4j-core 2.14.1

    What did I do?

    Upgrade org.apache.logging.log4j:log4j-core from 2.14.1 to 2.17.1 for vulnerability fix

    What did you expect to happen?

    Ideally, no insecure libs should be used.

    The specification of the pull request

    PR Specification from OSCS

    opened by HundredBai 0
  • Using TCK Tested JDK builds of OpenJDK

    Using TCK Tested JDK builds of OpenJDK

    The AdoptOpenJDK has been discontinued since July 2021 (https://adoptopenjdk.net). Switch the distribution to Azul Zulu. When using Zulu you get all the latest updated (TCK Tested) builds for all versions of OpenJDK.

    Also added are fixed (major) release version(s) such as JDK 11.0.3. This is often a good practice whenever a build/test triggers (push/pull events) that help determine if the latest (JDK 11) had failed the from the latest build vs something in your code caused (introduced). In addition to the workflow I consolidated the job by using a build matrix. :-)

    For example, when building with JDK 11.0.3 (fixed version) the build/tests passes (Green) and JDK 11 fails (Red) will mean that the latest JDK 11 was the cause and not your code.

    Note: Other distributions such as Temurin do not support archived fixed releases prior to Sept. 2021 and many non LTS (long term support) releases if you plan to try out newer features in the language.

    opened by carldea 0
  • Wrong usage of Java home

    Wrong usage of Java home

    When calling the program, e.g.

     java -jar sjk.jar hh -p 12556
    

    the first output is:

    Java home points to C:\Program Files\Java\jre1.8.0_202 make sure it is not a JRE path
    

    However, my JAVA_HOME variable is set as follows (result of set JAVA_HOME):

    JAVA_HOME=C:\Program Files\Java\jdk1.8.0_202
    

    So apparently the tool uses some other Java home, which I don't know how to change. I'd suggest to use the value of the JAVA_HOME environment variable instead. Currently I am unable to use the tool at all.

    I downloaded the newest version using wget https://bit.ly/2H3Uqck -O sjk.jar. My OS is Microsoft Windows 10 Pro (Version: 10.0.19042 Build 19042) and I tried cmd and Powershell. Please let me know if you need any further information.

    opened by MetaColon 1
  • Vulnerable Dependency: jcommander 1.30

    Vulnerable Dependency: jcommander 1.30

    https://github.com/aragozin/jvm-tools/blob/378285cc3b8a72a5547b428d8715b6665f91f95c/sjk-cli/pom.xml#L38 jcommander 1.30 is from 2012 and has a number of vulnerabilities. Should update to either jcommander 1.78 or 1.80

    opened by sirkojac 0
  • Unable to parse visualvm nps generated by visualvm 2.0.1

    Unable to parse visualvm nps generated by visualvm 2.0.1

    Hi, I ran into issue where sjk seems unable to understand nps format.

    VisualVM: v2.0.1 Jdk: v14

    Unable to parse file './profiler-snapshot2.nps'. Parser config: SJK Thread Dump (Magic: TRACEDUMP_1, TRACEDUMP_2), SJK Genereic Event Dump (Magic: EVENTDUMP_1), JStack dump parser
    Input files
      ./profiler-snapshot2.nps
    
    Unable to parse file './profiler-snapshot2.nps'. Parser config: SJK Thread Dump (Magic: TRACEDUMP_1, TRACEDUMP_2), SJK Genereic Event Dump (Magic: EVENTDUMP_1), JStack dump parser
    Stream reader error: java.io.IOException: Invalid magic
    java.io.IOException: Invalid magic
    	at org.gridkit.jvmtool.stacktrace.MagicReader.readMagic(MagicReader.java:33)
    	at org.gridkit.jvmtool.stacktrace.ThreadEventCodec.createEventReader(ThreadEventCodec.java:30)
    	at org.gridkit.jvmtool.AbstractEventDumpSource.openReader(AbstractEventDumpSource.java:151)
    	at org.gridkit.jvmtool.AbstractThreadDumpSource.openReader(AbstractThreadDumpSource.java:119)
    	at org.gridkit.jvmtool.AbstractEventDumpSource$1.produceNext(AbstractEventDumpSource.java:128)
    	at org.gridkit.jvmtool.event.ChainedEventReader.hasNext(ChainedEventReader.java:68)
    	at org.gridkit.jvmtool.event.ShieldedEventReader.seekNext(ShieldedEventReader.java:66)
    	at org.gridkit.jvmtool.event.ShieldedEventReader.hasNext(ShieldedEventReader.java:95)
    	at org.gridkit.jvmtool.event.ShieldedEventReader.seekNext(ShieldedEventReader.java:66)
    	at org.gridkit.jvmtool.event.ShieldedEventReader.hasNext(ShieldedEventReader.java:95)
    	at org.gridkit.jvmtool.event.MorphingEventReader.hasNext(MorphingEventReader.java:33)
    	at org.gridkit.jvmtool.hflame.JsonFlameDataSet.feed(JsonFlameDataSet.java:97)
    	at org.gridkit.jvmtool.hflame.cmd.FlameGraphGeneratorCmd$FlameGen.run(FlameGraphGeneratorCmd.java:100)
    	at org.gridkit.jvmtool.cli.CommandLauncher.start(CommandLauncher.java:134)
    	at org.gridkit.jvmtool.SJK.main(SJK.java:14)
    0 samples processed
    No data omit report generation```
    opened by crzyjcky 4
Owner
Alexey Ragozin
Alexey Ragozin
An application metrics facade for the most popular monitoring tools. Think SLF4J, but for metrics.

Micrometer Application Metrics An application metrics facade for the most popular monitoring tools. Instrument your code with dimensional metrics with

Micrometer Metrics 3.7k Dec 30, 2022
Tools for tracking down memory / JVM problems & generating predictable-as-possible VM behaviour

Hawkshaw Tools for tracking down memory / JVM problems & generating predictable-as-possible VM behaviour You can Use Hawkshaw to mimic application obj

Martijn Verburg 40 Jan 9, 2021
Java monitoring for the command-line, profiler included

jvmtop is a lightweight console application to monitor all accessible, running jvms on a machine. In a top-like manner, it displays JVM internal metri

null 1.2k Jan 6, 2023
Performance visualisation tools

grav A collection of tools to help visualise process execution. This blog post has some detail on the rationale and implementation detail. Scheduler p

Mark Price 283 Dec 30, 2022
Simple JVM Profiler Using StatsD and Other Metrics Backends

statsd-jvm-profiler statsd-jvm-profiler is a JVM agent profiler that sends profiling data to StatsD. Inspired by riemann-jvm-profiler, it was primaril

Etsy, Inc. 330 Oct 30, 2022
Kotlin-decompiled - (Almost) every single language construct of the Kotlin programming language compiled to JVM bytecode and then decompiled to Java again for better readability

Kotlin: Decompiled (Almost) every single language construct of the Kotlin programming language compiled to JVM bytecode and then decompiled to Java ag

The Self-Taught Software Engineer 27 Dec 14, 2022
Dynamic loading and compiling project based on JVM

camphor 基于jvm的弹性加载及编译中间件(Elastic loading and compiling middleware based on JVM) camphor_0.0.1 项目简介 该项目定位为弹性中间件,能够使系统在不重启的情况下完成增量代码文件的动态编译和加载 模块介绍 camp

palading 1 Jan 22, 2022
JavaOTTF - Official OTTF parser and composer for JVM languages

JavaOTTF Official OTTF parser and composer for JVM languages. Documentation Please refer to the Wiki Section. Installation Maven Add repository into p

Open Timetable 2 Nov 21, 2022
JVM Profiler Sending Metrics to Kafka, Console Output or Custom Reporter

Uber JVM Profiler Uber JVM Profiler provides a Java Agent to collect various metrics and stacktraces for Hadoop/Spark JVM processes in a distributed w

Uber Common 1.7k Dec 22, 2022
Sends stacktrace-level performance data from a JVM process to Riemann.

Riemann JVM Profiler riemann-jvm-profiler is a JVM agent that you can inject into any JVM process--one written in Clojure, Java, Scala, Groovy, etc.--

Riemann 288 Sep 21, 2022
A driver to allow deep interaction with the JVM without any restrictions

ToolFactory JVM Driver A driver to allow deep interaction with the JVM without any restrictions. To include ToolFactory JVM Driver in your projects si

ToolFactory 34 Oct 8, 2022
Jazzer is a coverage-guided, in-process fuzzer for the JVM platform developed by Code Intelligence

Jazzer is a coverage-guided, in-process fuzzer for the JVM platform developed by Code Intelligence. It is based on libFuzzer and brings many of its instrumentation-powered mutation features to the JVM.

Code Intelligence 696 Jan 5, 2023
chardetng for the JVM

chardetng_j This is chardetng compiled for the JVM using asmble. Licensing Please see the file named COPYRIGHT. TL;DR: Apache-2.0 OR MIT Disclaimer Th

Henri Sivonen 1 Oct 18, 2021
JVM Explorer is a Java desktop application for browsing loaded class files inside locally running Java Virtual Machines.

JVM Explorer JVM Explorer is a Java desktop application for browsing loaded class files inside locally running Java Virtual Machines. Features Browse

null 109 Nov 30, 2022
Sampling CPU and HEAP profiler for Java featuring AsyncGetCallTrace + perf_events

async-profiler This project is a low overhead sampling profiler for Java that does not suffer from Safepoint bias problem. It features HotSpot-specifi

null 5.8k Jan 3, 2023
Get Method Sampling from Java Flight Recorder Dump and convert to FlameGraph compatible format.

Note: Travis has removed the support for Oracle JDK 8. Therefore the build status is removed temporarily. Converting JFR Method Profiling Samples to F

M. Isuru Tharanga Chrishantha Perera 248 Dec 16, 2022
Log analyser / visualiser for Java HotSpot JIT compiler. Inspect inlining decisions, hot methods, bytecode, and assembly. View results in the JavaFX user interface.

JITWatch Log analyser and visualiser for the HotSpot JIT compiler. Video introduction to JITWatch video Slides from my LJC lightning talk on JITWatch

AdoptOpenJDK 2.8k Jan 3, 2023
Best-of-breed OpenTracing utilities, instrumentations and extensions

OpenTracing Toolbox OpenTracing Toolbox is a collection of libraries that build on top of OpenTracing and provide extensions and plugins to existing i

Zalando SE 181 Oct 15, 2022
A short and practical intro into project loom

project-loom Project loom is all about making concurrency easier (for developers) on the JVM. It is in experimental phase. Download the early access b

Ashwin Bhaskar 16 Dec 15, 2021