Java monitoring for the command-line, profiler included

Related tags

Profilers jvmtop
Overview

jvmtop is a lightweight console application to monitor all accessible, running jvms on a machine.
In a top-like manner, it displays JVM internal metrics (e.g. memory information) of running java processes.

Jvmtop does also include a CPU console profiler.

It's tested with different releases of Oracle JDK, IBM JDK and OpenJDK on Linux, Solaris, FreeBSD and Windows hosts.
Jvmtop requires a JDK - a JRE will not suffice.

Please note that it's currently in an alpha state -
if you experience an issue or need further help, please let us know.

Jvmtop is open-source. Checkout the source code. Patches are very welcome!

Also have a look at the documentation or at a captured live-example.

 JvmTop 0.8.0 alpha   amd64  8 cpus, Linux 2.6.32-27, load avg 0.12
 https://github.com/patric-r/jvmtop

  PID MAIN-CLASS      HPCUR HPMAX NHCUR NHMAX    CPU     GC    VM USERNAME   #T DL
 3370 rapperSimpleApp  165m  455m  109m  176m  0.12%  0.00% S6U37 web        21
11272 ver.resin.Resin [ERROR: Could not attach to VM]
27338 WatchdogManager   11m   28m   23m  130m  0.00%  0.00% S6U37 web        31
19187 m.jvmtop.JvmTop   20m 3544m   13m  130m  0.93%  0.47% S6U37 web        20
16733 artup.Bootstrap  159m  455m  166m  304m  0.12%  0.00% S6U37 web        46

Installation

Click on the releases tab, download the most recent tar.gz archive. Extract it, ensure that the `JAVA_HOME` environment variable points to a valid JDK and run `./jvmtop.sh`.

Further information can be found in the [INSTALL file](https://github.com/patric-r/jvmtop/blob/master/INSTALL)

08/14/2013 jvmtop 0.8.0 released

Changes:
  • improved attach compatibility for all IBM jvms
  • fixed wrong CPU/GC values for IBM J9 jvms
  • in case of unsupported heap size metric retrieval, n/a will be displayed instead of 0m
  • improved argument parsing, support for short-options, added help (pass --help), see issue #28 (now using the great jopt-simple library)
  • when passing the --once option, terminal will not be cleared anymore (see issue #27)
  • improved shell script for guessing the path if a JAVA_HOME environment variable is not present (thanks to Markus Kolb)

Full changelog


In VM detail mode it shows you the top CPU-consuming threads, beside detailed metrics:


 JvmTop 0.8.0 alpha   amd64,  4 cpus, Linux 2.6.18-34
 https://github.com/patric-r/jvmtop

 PID 3539: org.apache.catalina.startup.Bootstrap
 ARGS: start
 VMARGS: -Djava.util.logging.config.file=/home/webserver/apache-tomcat-5.5[...]
 VM: Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM 1.6.0_25
 UP: 869:33m #THR: 106  #THRPEAK: 143  #THRCREATED: 128020 USER: webserver
 CPU:  4.55% GC:  3.25% HEAP: 137m / 227m NONHEAP:  75m / 304m
  TID   NAME                                    STATE    CPU  TOTALCPU BLOCKEDBY
     25 http-8080-Processor13                RUNNABLE  4.55%     1.60%
 128022 RMI TCP Connection(18)-10.101.       RUNNABLE  1.82%     0.02%
  36578 http-8080-Processor164               RUNNABLE  0.91%     2.35%
  36453 http-8080-Processor94                RUNNABLE  0.91%     1.52%
     27 http-8080-Processor15                RUNNABLE  0.91%     1.81%
     14 http-8080-Processor2                 RUNNABLE  0.91%     3.17%
 128026 JMX server connection timeout   TIMED_WAITING  0.00%     0.00%

Pull requests / bug reports are always welcome.

Comments
  • com.ibm.tools.attach.AttachNotSupportedException: target not found

    com.ibm.tools.attach.AttachNotSupportedException: target not found

    What steps will reproduce the problem?
    1. Environment is Linux machine running IBM WebSphere8 64-bit.
    2. Execute jvmtop against java pid.
    
    What is the expected output? What do you see instead?
    
    ==> I get the following error ::
    
    com.ibm.tools.attach.AttachNotSupportedException: target not found
            at com.ibm.tools.attach.javaSE.VirtualMachineImpl.attachTarget(VirtualMachineImpl.java:81)
            at com.ibm.tools.attach.javaSE.AttachProviderImpl.attachVirtualMachine(AttachProviderImpl.java:37)
            at ibm.tools.attach.J9AttachProvider.attachVirtualMachine(J9AttachProvider.java:60)
            at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:221)
            at com.jvmtop.openjdk.tools.LocalVirtualMachine.getLocalVirtualMachine(LocalVirtualMachine.java:277)
            at com.jvmtop.VMDetailView.<init>(VMDetailView.java:23)
            at com.jvmtop.JvmTop.main(JvmTop.java:36)
    com.ibm.tools.attach.AttachNotSupportedException: target not found
            at com.ibm.tools.attach.javaSE.VirtualMachineImpl.attachTarget(VirtualMachineImpl.java:81)
            at com.ibm.tools.attach.javaSE.AttachProviderImpl.attachVirtualMachine(AttachProviderImpl.java:37)
            at ibm.tools.attach.J9AttachProvider.attachVirtualMachine(J9AttachProvider.java:60)
            at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:221)
            at com.jvmtop.VMInfo.processNewVM(VMInfo.java:134)
            at com.jvmtop.VMDetailView.<init>(VMDetailView.java:24)
            at com.jvmtop.JvmTop.main(JvmTop.java:36)
    Error while attaching vm 13315
    com.sun.tools.attach.AttachNotSupportedException: target not found
            at ibm.tools.attach.J9AttachProvider.attachVirtualMachine(J9AttachProvider.java:65)
            at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:221)
            at com.jvmtop.VMInfo.processNewVM(VMInfo.java:134)
            at com.jvmtop.VMDetailView.<init>(VMDetailView.java:24)
            at com.jvmtop.JvmTop.main(JvmTop.java:36)
    Exception in thread "main" java.lang.NullPointerException
            at com.jvmtop.VMInfo.processNewVM(VMInfo.java:147)
            at com.jvmtop.VMDetailView.<init>(VMDetailView.java:24)
            at com.jvmtop.JvmTop.main(JvmTop.java:36)
    
    
    What version of the product are you using? On what operating system?
    
    ==> jvmtop 0.3 on Linux / CentOS 64-bit
    
    Please provide any additional information below.
    
    ==> IBM JDK used to run WebSphere & execute jvmtop is the same :
    
    java version "1.6.0"
    Java(TM) SE Runtime Environment (build pxa6460_26sr1fp1-20120309_01(SR1 FP1))
    IBM J9 VM (build 2.6, JRE 1.6.0 Linux amd64-64 20120308_104898 (JIT enabled, 
    AOT enabled)
    J9VM - R26_Java626_SR1_FP1_20120308_1511_B104898
    JIT  - r11_20111028_21230ifx5
    GC   - R26_Java626_SR1_FP1_20120308_1511_B104898
    J9CL - 20120308_104898)
    JCL  - 20120214_01
    
    
    

    Original issue reported on code.google.com by [email protected] on 4 Apr 2013 at 4:45

    Priority-Medium Type-Defect auto-migrated 
    opened by GoogleCodeExporter 19
  • high thread creation when executed by nagios nrpe.

    high thread creation when executed by nagios nrpe.

    What steps will reproduce the problem?
    1. ./jvmtop.sh --once.
    2.
    3.
    
    What is the expected output? What do you see instead?
    Attached is the video screen record link.
    
    What version of jvmtop are you using? On what operating system?
    jvmtop 1.7.1
    
    Please post the output of the following commands:
    java -version
    echo $JAVA_HOME  (for unix/linux systems)
    echo %JAVA_HOME% (for windows)
    
    
    Please provide any additional information below.
    
    hi,
    
    Like i had discussed about my intention to develop a nagios plugin by using 
    jvmtop.sh, i completed the script. On testing. I get to see a shocking result 
    about the thread creations in my linux centos box.  I set nagios to check and 
    run script every 2 min. but when i looked at the performance in HTOP. i see the 
    thread is continuously growing by .jvmtop.sh. I started on Friday. and today on 
    monday it almost created a min 2000 thread!!. consuming 300MB resident memory, 
    and all having priority 15.  
    
    With this much thread creation by jvmtop, i dont think nagios plugin will work 
    on top of it. below is the line which executes the jvmtop.sh and grep the jvm 
    process.  eg: script.sh -j org.jboss.Main 
    
    tmp_output=$(/usr/local/nagios/libexec/jvmtop.sh --once | grep $PROCESS)
    
    Let me know whats your openion on this.
    
    http://www29.zippyshare.com/v/5648707/file.html
    
    

    Original issue reported on code.google.com by [email protected] on 12 Aug 2013 at 6:19

    Priority-Medium Type-Defect auto-migrated 
    opened by GoogleCodeExporter 16
  • jvmstat cannot attach to JVM (Tomcat)

    jvmstat cannot attach to JVM (Tomcat)

    When I run jvmstat.sh I get following error message
    
     JvmTop 0.4.1 alpha (expect bugs)  amd64,  1 cpus, Linux 3.4.28-2.
     http://code.google.com/p/jvmtop
    
      PID MAIN-CLASS      HPCUR HPMAX NHCUR NHMAX    CPU     GC    VM USERNAME   #T DL
     1136 m.jvmtop.JvmTop   14m  958m    8m  130m  3.86%  0.00% 1.7.0     root   12
    10449 artup.Bootstrap [ERROR: Could not attach to VM]
    
    
    If I specify the pid I get following error message
    
    Error while attaching vm 10449
    com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: 
    target process not responding or HotSpot VM not loaded
            at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:102)
            at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63)
            at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
            at com.jvmtop.VMInfo.processNewVM(VMInfo.java:138)
            at com.jvmtop.VMDetailView.<init>(VMDetailView.java:24)
            at com.jvmtop.JvmTop.main(JvmTop.java:35)
    Exception in thread "main" java.lang.NullPointerException
            at com.jvmtop.VMDetailView.printView(VMDetailView.java:32)
            at com.jvmtop.JvmTop.run(JvmTop.java:70)
            at com.jvmtop.JvmTop.main(JvmTop.java:35)
    
    
    I'm using:
    Linux 3.4.28-2.20-desktop #1 SMP PREEMPT Tue Jan 29 16:51:37 UTC 2013 (143156b) 
    x86_64 x86_64 x86_64 GNU/Linux
    java version "1.7.0"
    Java(TM) SE Runtime Environment (build 1.7.0-b147)
    Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
    
    
    
    
    
    
    
    
    

    Original issue reported on code.google.com by [email protected] on 29 Apr 2013 at 7:27

    Priority-Medium Type-Defect auto-migrated 
    opened by GoogleCodeExporter 14
  • output scrolls up every 1s  instead of stayin in fixed location.

    output scrolls up every 1s instead of stayin in fixed location.

    What steps will reproduce the problem?
    1.  ./jvmtop.sh
    2.
    3.
    
    What is the expected output? What do you see instead?
    attached jvmtopout.jpg
    
    What version of jvmtop are you using? On what operating system?
    
    jvmtop-0.7.0
    
    Please post the output of the following commands:
    java -version
    java version "1.6.0_25"
    Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
    
    echo $JAVA_HOME  (for unix/linux systems)
    echo %JAVA_HOME% (for windows)
    
    
    Please provide any additional information below.
    
    Kindly fix the scrolling mode. it would be nice to have it like linux TOP does. 
     and is it possible to display the output only once ? by which i am planning to 
    develop a nagios script plugin which will get output from this and generate 
    graphs. 
    
    Awaiting your reply. 
    Great work. thanks.
    

    Original issue reported on code.google.com by [email protected] on 30 Jul 2013 at 5:38

    Attachments:

    Priority-Medium Type-Defect auto-migrated 
    opened by GoogleCodeExporter 11
  • NOT COMPATIBLE WITH RED_HAT_5

    NOT COMPATIBLE WITH RED_HAT_5

    Before submitting a bug report, please check the FAQ:
    http://code.google.com/p/jvmtop/wiki/FAQ
    
    
    What steps will reproduce the problem?
    1.
    2.
    3.
    
    What is the expected output? What do you see instead?
    
    
    What version of jvmtop are you using? On what operating system?
    
    
    Please post the output of the following commands:
    java -version
    echo $JAVA_HOME  (for unix/linux systems)
    echo %JAVA_HOME% (for windows)
    
    
    Please provide any additional information below.
    
    
    

    Original issue reported on code.google.com by [email protected] on 11 Feb 2014 at 1:30

    Priority-Medium Type-Defect auto-migrated 
    opened by GoogleCodeExporter 10
  • Crash when starting Glassfish whilst jvmtop is running

    Crash when starting Glassfish whilst jvmtop is running

    What steps will reproduce the problem?
    1. Start jvmtop
    2. Start Glassfish
    
    What is the expected output? What do you see instead?
    
      PID MAIN-CLASS      HPCUR HPMAX NHCUR NHMAX    CPU     GC    VM USERNAME   #T DL
    17169 m.jvmtop.JvmTop   26m 1715m    9m  130m  0.21%  0.00% O7U21    phill   12
    java.io.IOException: Unable to open socket file: target process not responding 
    or HotSpot VM not loaded
        at com.jvmtop.openjdk.tools.LocalVirtualMachine.loadManagementAgent(LocalVirtualMachine.java:341)
        at com.jvmtop.openjdk.tools.LocalVirtualMachine.startManagementAgent(LocalVirtualMachine.java:137)
        at com.jvmtop.openjdk.tools.ProxyClient.tryConnect(ProxyClient.java:367)
        at com.jvmtop.openjdk.tools.ProxyClient.connect(ProxyClient.java:349)
        at com.jvmtop.VMInfo.attachToVM(VMInfo.java:187)
        at com.jvmtop.VMInfo.processNewVM(VMInfo.java:146)
        at com.jvmtop.VMOverviewView.scanForNewVMs(VMOverviewView.java:132)
        at com.jvmtop.VMOverviewView.printView(VMOverviewView.java:25)
        at com.jvmtop.JvmTop.run(JvmTop.java:70)
        at com.jvmtop.JvmTop.main(JvmTop.java:41)
    Caused by: com.sun.tools.attach.AttachNotSupportedException: Unable to open 
    socket file: target process not responding or HotSpot VM not loaded
        at sun.tools.attach.BsdVirtualMachine.<init>(BsdVirtualMachine.java:90)
        at sun.tools.attach.BsdAttachProvider.attachVirtualMachine(BsdAttachProvider.java:63)
        at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
        at com.jvmtop.openjdk.tools.LocalVirtualMachine.loadManagementAgent(LocalVirtualMachine.java:337)
        ... 9 more
    java.lang.reflect.UndeclaredThrowableException
        at com.sun.proxy.$Proxy5.getHeapMemoryUsage(Unknown Source)
        at com.jvmtop.VMInfo.update(VMInfo.java:235)
        at com.jvmtop.VMOverviewView.updateVMs(VMOverviewView.java:110)
        at com.jvmtop.VMOverviewView.printView(VMOverviewView.java:27)
        at com.jvmtop.JvmTop.run(JvmTop.java:70)
        at com.jvmtop.JvmTop.main(JvmTop.java:41)
    Caused by: java.rmi.ConnectException: Connection refused to host: 
    192.168.200.97; nested exception is:
        java.net.ConnectException: Connection refused
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128)
        at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
        at javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttributes(Unknown Source)
        at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttributes(RMIConnector.java:926)
        at com.jvmtop.openjdk.tools.ProxyClient$SnapshotInvocationHandler.getCachedAttributes(ProxyClient.java:1053)
        at com.jvmtop.openjdk.tools.ProxyClient$SnapshotInvocationHandler.getAttribute(ProxyClient.java:1012)
        at com.jvmtop.openjdk.tools.ProxyClient$SnapshotInvocationHandler.invoke(ProxyClient.java:994)
        at com.sun.proxy.$Proxy0.getAttribute(Unknown Source)
        at com.sun.jmx.mbeanserver.MXBeanProxy$GetHandler.invoke(MXBeanProxy.java:122)
        at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:167)
        at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:265)
        ... 6 more
    Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
        at java.net.Socket.connect(Socket.java:579)
        at java.net.Socket.connect(Socket.java:528)
        at java.net.Socket.<init>(Socket.java:425)
        at java.net.Socket.<init>(Socket.java:208)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
        ... 19 more
    Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
        at com.sun.proxy.$Proxy6.findDeadlockedThreads(Unknown Source)
        at com.jvmtop.VMInfo.hasDeadlockThreads(VMInfo.java:330)
        at com.jvmtop.VMOverviewView.printVM(VMOverviewView.java:85)
        at com.jvmtop.VMOverviewView.printView(VMOverviewView.java:37)
        at com.jvmtop.JvmTop.run(JvmTop.java:70)
        at com.jvmtop.JvmTop.main(JvmTop.java:41)
    Caused by: java.rmi.ConnectException: Connection refused to host: 
    192.168.200.97; nested exception is:
        java.net.ConnectException: Connection refused
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128)
        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:1017)
        at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at com.jvmtop.openjdk.tools.ProxyClient$SnapshotInvocationHandler.invoke(ProxyClient.java:1002)
        at com.sun.proxy.$Proxy0.invoke(Unknown Source)
        at com.sun.jmx.mbeanserver.MXBeanProxy$InvokeHandler.invoke(MXBeanProxy.java:150)
        at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:167)
        at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:265)
        ... 6 more
    Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
        at java.net.Socket.connect(Socket.java:579)
        at java.net.Socket.connect(Socket.java:528)
        at java.net.Socket.<init>(Socket.java:425)
        at java.net.Socket.<init>(Socket.java:208)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
        ... 20 more
    
    What version of the product are you using? On what operating system?
    
    0.5.0 Mac OS X
    
    

    Original issue reported on code.google.com by [email protected] on 26 May 2013 at 3:45

    Priority-Medium Type-Defect auto-migrated 
    opened by GoogleCodeExporter 10
  • Unable to attach to other user`s JVMs, even if root

    Unable to attach to other user`s JVMs, even if root

    What steps will reproduce the problem?
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    1. start a JVM with user X
    2. try to run jvmtop from another user, or root, it will not attach.
    3. with JConsole I can attach to all JVMs when JConsole starts as root.
    
    What is the expected output? What do you see instead?
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    More of a nice to have really.  I have close to 10 JVMs running on a system, 
    all owned by different users, and it would be nice if I could monitor all of 
    them from a single instance of jvmtop.
    
    What version of the product are you using? On what operating system?
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    jvmtop 0.4.1
    
    Mint 14, native install and inside VirtualBox, same results.
    
    all JVMs use:
    java version "1.7.0_21"
    Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
    
    
    Please provide any additional information below.
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    Keep up the great work, I love this tool.
    
    
    
    Sample output.
    ^^^^^^^^^^^^^^
    # NOTE: 19563, 19509 and 19624 are all owned by a different user, running 
    ZooKeeper.
    
    inter01 jvmtop # id
    uid=0(root) gid=0(root) groups=0(root)
    inter01 jvmtop # ./jvmtop.sh
    Error while attaching vm 19563
    com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: 
    target process not responding or HotSpot VM not loaded
        at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:106)
        at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63)
        at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
        at com.jvmtop.VMInfo.processNewVM(VMInfo.java:138)
        at com.jvmtop.VMOverviewView.scanForNewVMs(VMOverviewView.java:132)
        at com.jvmtop.VMOverviewView.printView(VMOverviewView.java:25)
        at com.jvmtop.JvmTop.run(JvmTop.java:70)
        at com.jvmtop.JvmTop.main(JvmTop.java:41)
    Error while attaching vm 19509
    com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: 
    target process not responding or HotSpot VM not loaded
        at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:106)
        at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63)
        at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
        at com.jvmtop.VMInfo.processNewVM(VMInfo.java:138)
        at com.jvmtop.VMOverviewView.scanForNewVMs(VMOverviewView.java:132)
        at com.jvmtop.VMOverviewView.printView(VMOverviewView.java:25)
        at com.jvmtop.JvmTop.run(JvmTop.java:70)
        at com.jvmtop.JvmTop.main(JvmTop.java:41)
    Error while attaching vm 19624
    java.io.IOException: well-known file is not secure
        at sun.tools.attach.LinuxVirtualMachine.checkPermissions(Native Method)
        at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:117)
        at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63)
        at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
        at com.jvmtop.VMInfo.processNewVM(VMInfo.java:138)
        at com.jvmtop.VMOverviewView.scanForNewVMs(VMOverviewView.java:132)
        at com.jvmtop.VMOverviewView.printView(VMOverviewView.java:25)
        at com.jvmtop.JvmTop.run(JvmTop.java:70)
        at com.jvmtop.JvmTop.main(JvmTop.java:41)
    
     JvmTop 0.4.1 alpha (expect bugs)  amd64, 12 cpus, Linux 3.5.0-28-
     http://code.google.com/p/jvmtop
    
      PID MAIN-CLASS      HPCUR HPMAX NHCUR NHMAX    CPU     GC    VM USERNAME   #T DL
    19959 onsole.JConsole    8m 7134m   25m  130m  0.66%  0.24% O7U21     root   32 
    
    20335 m.jvmtop.JvmTop   20m 7134m    8m  130m  0.41%  0.00% O7U21     root   14 
    
    19563 .QuorumPeerMain [ERROR: Could not attach to VM] 
    19509 .QuorumPeerMain [ERROR: Could not attach to VM] 
    19624 .QuorumPeerMain [ERROR: Could not attach to VM]
    
    inter01 jvmtop # ps -ef|grep java
    zkadm1   19509     1  0 10:49 pts/2    00:00:02 
    /inter/zkadm1/jdk1.7.0_21/bin/java [...]
    zkadm2   19563     1  0 10:49 pts/2    00:00:02 
    /inter/zkadm2/jdk1.7.0_21/bin/java [...]
    zkadm3   19624     1  0 10:49 pts/2    00:00:06 
    /inter/zkadm3/jdk1.7.0_21/bin/java [...]
    root     20375 20288  0 11:05 pts/1    00:00:00 grep --colour=auto java
    
    [...]: output cut, but it runs ZooKeeper instances.
    
    
    

    Original issue reported on code.google.com by [email protected] on 23 May 2013 at 3:11

    Priority-Medium auto-migrated Type-Enhancement 
    opened by GoogleCodeExporter 10
  • Doesn't work on OS X

    Doesn't work on OS X

    What steps will reproduce the problem?
    1. Try and run with OS X
    2. Does not work.  Says requires real JDK.
    
    tools.jar is not packaged up as a separate jar in the OS X JDK.  You don't need 
    to add it to the classpath like on Windows/Unix.  I wrote and tested the 
    following fix:
    
    if [ `uname` != 'Darwin' ] ; then
      if [ ! -f "$TOOLSJAR" ] ; then
        echo "$JAVA_HOME seems to be no JDK!" >&2
        exit 1
      fi
    fi
    
    
    
    
    

    Original issue reported on code.google.com by [email protected] on 10 Sep 2013 at 11:51

    Priority-Medium Type-Defect auto-migrated 
    opened by GoogleCodeExporter 9
  • Can I get access to source code?

    Can I get access to source code?

    Hey,
    
    just wanted to say thank you. This looks like a really awesome project. I tried 
    looking around for source code, but couldn't find anything.
    
    Is this something I can get access to?
    
    Thanks,
    Nik 
    

    Original issue reported on code.google.com by [email protected] on 23 May 2013 at 4:41

    Priority-Medium auto-migrated Type-Other 
    opened by GoogleCodeExporter 9
  • CPU/Memory Sampling?

    CPU/Memory Sampling?

    Hey, this surely is a very handy tool. this essentially could be used for monitoring remote VMs. Is there any way for sampling like in JVisualVm? the current stats are "good to know" but, wouldn't help much in monitoring heap/CPU.

    enhancement 
    opened by tckb 8
  • ERROR: Could not attach to process.

    ERROR: Could not attach to process.

     JvmTop 0.6.0 alpha          amd64,  4 cpus, Linux 2.6.18-19
     http://code.google.com/p/jvmtop
    
    ERROR: Could not attach to process.
    
    
    java -version
    java version "1.6.0_22"
    Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
    Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
    
    
    

    Original issue reported on code.google.com by [email protected] on 12 Jul 2013 at 3:58

    Priority-Medium Type-Defect auto-migrated 
    opened by GoogleCodeExporter 7
  • CPU Usage >100%

    CPU Usage >100%

    output_snap.txt

    I'm a performance test engineer. I've been using jvmtop for a few months to monitor JVM statistics. As I've tallied the output with Jconsole, I've mostly observed similar stats in jvmtop as well. However during a recent test execution I've observed few entries of CPU% to go above 100% (120% being the highest). Now as I believe jvmtop provides cumulative CPU usage (not like top which provides more of core-wise details), need guidance on how to interpret this entries of beyond 100% usage.

    opened by swdas-codes 0
  • JDK 11 changes

    JDK 11 changes

    I have tested Jdk 11 and with minimum changes, I am able to compile and run with JDK 11. All functionality is working fine. Please check if you can incorporate changes.

    opened by bmistry13 0
  • /usr/lib/jvm/java-11-openjdk-amd64/bin seems to be no JDK!

    /usr/lib/jvm/java-11-openjdk-amd64/bin seems to be no JDK!

    I have java jdk & jre installed on Ubuntu 20.04, and I added: JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 to jvmtop.sh (line 10), as I saw in a tutorial. Im asuming this counts as having a valid JDK environment path, but even if it doesn't, I already tried everything I mention here: https://askubuntu.com/questions/1248311/running-jvmtop-profile-the-java-home-environment-variable

    However I get this message: /usr/lib/jvm/java-11-openjdk-amd64/bin seems to be no JDK! oddly enough, the path in the error seems to include bin, even though I only specified it up to java-11-openjdk-amd64.

    I did nothing more and nothing less than what I mentioned. Am I missing something?

    opened by Mangonels 5
  • Issue with Java 11 (no tools.jar existent)

    Issue with Java 11 (no tools.jar existent)

    @patric-r, I'm seeing this error with openjdk: [user@server jvmtop-0.8.0]$ ./jvmtop.sh /usr/lib/jvm/java-11-openjdk-11.0.3.7-0.el7_6.x86_64 seems to be no JDK!

    It has something to do with the tools.jar [user@server jvmtop-0.8.0]$ grep -3 seems jvmtop.sh TOOLSJAR="$JAVA_HOME/lib/tools.jar"

    if [ ! -f "$TOOLSJAR" ] ; then echo "$JAVA_HOME seems to be no JDK!" >&2 exit 1 fi

    tools.jar which seems to be a prerequisite for running jvmtop was removed with java 9, see https://www.reddit.com/r/javahelp/comments/765mwr/installed_jdk_9_and_my_toolsjar_is_missing/

    [user@server jvm]$ find /usr/lib/jvm/* -type f -name tools.jar [user@server jvm]$

    So it can't be used at least with OpenJDK or Amazon Corretto in Version 11. Any ideas?

    opened by philipp-eliasch 5
Owner
null
Java memory allocation profiler

Aprof - Java Memory Allocation Profiler What is it? The Aprof project is a Java Memory Allocation Profiler with very low performance impact on profile

Devexperts 211 Dec 15, 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
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
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
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
Small set of tools for JVM troublshooting, monitoring and profiling.

Swiss Java Knife (SJK) SJK is a command line tool for JVM diagnostic, troubleshooting and profiling. SJK exploits standard diagnostic interfaces of JV

Alexey Ragozin 3.2k Jan 3, 2023
JDK main-line development

Welcome to the JDK! For build instructions please see the online documentation, or either of these files: doc/building.html (html version) doc/buildin

OpenJDK 14.8k Dec 29, 2022
One file java script for visualizing JDK flight recorder execution logs as flamegraphs without any dependencies except Java and a browser.

Flamegraph from JFR logs Simple one file Java script to generate flamegraphs from Java flight recordings without installing Perl and the Brendan Gregg

Billy Sjöberg 17 Oct 2, 2022
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
A Java agent that rewrites bytecode to instrument allocation sites

The Allocation Instrumenter is a Java agent written using the java.lang.instrument API and ASM. Each allocation in your Java program is instrumented;

Google 438 Dec 19, 2022
BTrace - a safe, dynamic tracing tool for the Java platform

btrace A safe, dynamic tracing tool for the Java platform Version 2.1.0 Quick Summary BTrace is a safe, dynamic tracing tool for the Java platform. BT

btrace.io 5.3k Jan 9, 2023
Fork of tagtraum industries' GCViewer. Tagtraum stopped development in 2008, I aim to improve support for Sun's / Oracle's java 1.6+ garbage collector logs (including G1 collector)

GCViewer 1.36 GCViewer is a little tool that visualizes verbose GC output generated by Sun / Oracle, IBM, HP and BEA Java Virtual Machines. It is free

null 4.1k Jan 4, 2023
Java Agent for Memory Measurements

Overview Jamm provides MemoryMeter, a Java agent for all Java versions to measure actual object memory use including JVM overhead. Use To use MemoryMe

Jonathan Ellis 624 Dec 28, 2022
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
Tool for creating reports from Java Flight Recorder dumps

jfr-report-tool Tool for creating reports from Java Flight Recorder dumps. Influenced by https://github.com/chrishantha/jfr-flame-graph . Kudos to @ch

Lari Hotari 50 Oct 28, 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
A java agent to generate method mappings to use with the linux `perf` tool

perf-map-agent A java agent to generate /tmp/perf-<pid>.map files for just-in-time(JIT)-compiled methods for use with the Linux perf tools. Build Make

null 1.5k Jan 1, 2023
PerfJ is a wrapper of linux perf for java programs.

PerfJ PerfJ is a wrapper of linux perf for java programs. As Brendan Gregg's words In order to profile java programs, you need a profiler that can sam

Min Zhou 353 Jan 2, 2023
OOM diagnostics for Java.

Polarbear A tool to help diagnose OutOfMemoryError conditions. Polarbear helps track down the root cause of OutOfMemoryError exceptions in Java. When

Cue 20 May 14, 2019