Code Monkey home page Code Monkey logo

jvm-mon's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jvm-mon's Issues

Top threads CPU miscalculation?

image

How can I interpret the CPU and TotalCPU columns?
The screenshot is from my laptop and it certainly has less than 10 or ever 8 CPU cores :)

ClassNotFoundException on MacOS/Java 8

When I try to run a build of HEAD, I get the following:

$ bin/jvm-mon
Exception in thread "main" java.lang.NoClassDefFoundError: sun/jvmstat/monitor/MonitorException
	at com.jvmtop.view.VMOverviewView.scanForNewVMs(VMOverviewView.java:157)
	at JvmMon.update(JvmMon.java:38)
	at JvmMon.main(JvmMon.java:22)
Caused by: java.lang.ClassNotFoundException: sun.jvmstat.monitor.MonitorException
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 3 more
$ java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
$ uname -a
Darwin somehost.local 15.6.0 Darwin Kernel Version 15.6.0: Mon Jan  9 23:07:29 PST 2017; root:xnu-3248.60.11.2.1~1/RELEASE_X86_64 x86_64

Export Protocol

Hi, I was curious if there is an option to load the program into a JVM and recieve data and collection to a database or log file? I wrote a pull request a while back and really like the concept.

when start got error

objc[56636]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/java (0x10b6864c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x11333f4e0). One of the two will be used. Which one is undefined.

Display Java processes being run by other users on a box

I like the idea of jvm-mon, but it would be really useful if it displayed/monitored all the java processes running on a box (irrespective of user). If I run jvm-mon as root on my machine (Fedora 23) I would expect to be able to see all java processes running (they are available via jps), but this isn't the case.

stack guard warning and IOException when starting

I'm unable to start the application due to some IOException. There's also warnings related to stack guard:

bin/jvm-mon
OpenJDK 64-Bit Server VM warning: You have loaded library /home/minecraft/jvm-mon-0.3/libj2v8_linux_x86_64.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
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:208)
        at com.jvmtop.openjdk.tools.LocalVirtualMachine.loadManagementAgent(LocalVirtualMachine.java:341)
        at com.jvmtop.openjdk.tools.LocalVirtualMachine.startManagementAgent(LocalVirtualMachine.java:141)
        at com.jvmtop.openjdk.tools.ProxyClient.tryConnect(ProxyClient.java:372)
        at com.jvmtop.openjdk.tools.ProxyClient.connect(ProxyClient.java:354)
        at com.jvmtop.monitor.VMInfo.attachToVM(VMInfo.java:219)
        at com.jvmtop.monitor.VMInfo.processNewVM(VMInfo.java:186)
        at com.jvmtop.view.VMOverviewView.scanForNewVMs(VMOverviewView.java:176)
        at JvmMon.update(JvmMon.java:50)
        at JvmMon.<init>(JvmMon.java:45)
        at JvmMon.main(JvmMon.java:27)

This is on CentOS Linux release 7.4.1708 (Core)
with
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)

IndexOutOfBoundsException: Index: 0, Size: 0

Dear ajermakovics,

I get a "IndexOutOfBoundsException: Index: 0, Size: 0" on running jvm-mon-0.3/bin/jvm-mon.

./jvm-mon-0.3/bin/jvm-mon
OpenJDK 64-Bit Server VM warning: You have loaded library /tmp/java-monitoring/jvm-mon-0.3/libj2v8_linux_x86_64.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'.
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at JvmMon.(JvmMon.java:46)
at JvmMon.main(JvmMon.java:27)

My Env

cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian

java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-1~bpo8+1-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

echo $JAVA_HOME
/usr/lib/jvm/java-8-openjdk-amd64

Could you help?

best regards

ConnectIOException at startup

This maybe a little weird but it's really happening and I don't realize why.

Just launching bin/jvm-mon with:

  • jvm-mon version 0.3
  • java version "1.8.0_171"
    Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
  • Linux localhost 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
  • Ubuntu 14.04 LTS
java.rmi.ConnectIOException: Exception creating connection to: 192.168.0.150; nested exception is:
	java.net.NoRouteToHostException: No route to host (Host unreachable)
	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:631)
	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:129)
	at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227)
	at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179)
	at com.sun.proxy.$Proxy0.newClient(Unknown Source)
	at javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2430)
	at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:308)
	at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270)
	at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:229)
	at com.jvmtop.openjdk.tools.ProxyClient.tryConnect(ProxyClient.java:392)
	at com.jvmtop.openjdk.tools.ProxyClient.connect(ProxyClient.java:354)
	at com.jvmtop.monitor.VMInfo.attachToVM(VMInfo.java:219)
	at com.jvmtop.monitor.VMInfo.processNewVM(VMInfo.java:186)
	at com.jvmtop.view.VMOverviewView.scanForNewVMs(VMOverviewView.java:176)
	at JvmMon.update(JvmMon.java:50)
	at JvmMon.<init>(JvmMon.java:45)
	at JvmMon.main(JvmMon.java:27)
Caused by: java.net.NoRouteToHostException: No route to host (Host unreachable)
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at java.net.Socket.connect(Socket.java:538)
	at java.net.Socket.<init>(Socket.java:434)
	at java.net.Socket.<init>(Socket.java:211)
	at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
	at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:148)
	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
	... 18 more

Interfaces Ip addr:

ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether f4:03:43:57:41:6c brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.200/24 brd 192.168.0.255 scope global em1
       valid_lft forever preferred_lft forever
    inet6 fe80::f603:43ff:fe57:416c/64 scope link
       valid_lft forever preferred_lft forever
3: em2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether f4:03:43:57:41:6d brd ff:ff:ff:ff:ff:ff
4: em3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether f4:03:43:57:41:6e brd ff:ff:ff:ff:ff:ff
5: em4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether f4:03:43:57:41:6f brd ff:ff:ff:ff:ff:ff

Kernel IP routing table

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG        0 0          0 em1
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 em1

Support remote host JVM monitoring

Hello, very nice console app!
Is there a way to monitor remote JVM, i.e over JMX?
I have jvm apps on remote but with JRE only and cant install JDK there

UnsatisfiedLinkError: Could not load J2V8 library. Reasons: no j2v8_linux_x86_64 in java.library.path

Executing from a VM, unzipped package, CentOS 6

Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /home/rss/libj2v8_linux_x86_64.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.IllegalStateException: J2V8 native library not loaded
	at com.eclipsesource.v8.V8.checkNativeLibraryLoaded(V8.java:195)
	at com.eclipsesource.v8.V8.createV8Runtime(V8.java:149)
	at com.eclipsesource.v8.V8.createV8Runtime(V8.java:125)
	at com.eclipsesource.v8.NodeJS.createNodeJS(NodeJS.java:58)
	at com.eclipsesource.v8.NodeJS.createNodeJS(NodeJS.java:45)
	at JvmMon.<clinit>(JvmMon.java:12)
Caused by: java.lang.UnsatisfiedLinkError: Could not load J2V8 library. Reasons:
	no j2v8_linux_x86_64 in java.library.path
	/home/rss/libj2v8_linux_x86_64.so: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /home/rss/libj2v8_linux_x86_64.so)

	at com.eclipsesource.v8.LibraryLoader.loadLibrary(LibraryLoader.java:75)
	at com.eclipsesource.v8.V8.load(V8.java:71)
	at com.eclipsesource.v8.V8.createV8Runtime(V8.java:145)
	... 4 more

Stack guard message, then empty screen and broken console

Hi, during the startup I get the "You have loaded library...." message, then my console is cleared and nothing is shown.
image

When I CTRL-C, my console is not usable, since there is only 1 line available. On the screenshot there is an OLD line written, then Enter, then NEW written:
image

Any ideas? I work on Windows, using Cygwin consoles managed by ConEmu 64

Possible hint: I got I working the first time! But since then never again...

TypeError: Cannot read property 'Id' of undefined

I got the following error while running jvm-mon. Not sure if there are logs I can inspect or not.

$ jvm-mon
TypeError: Cannot read property 'Id' of undefined
    at renderVmCharts (/usr/local/Cellar/jvm-mon/0.3/libexec/jvm-mon.js:174:25)
    at addData (/usr/local/Cellar/jvm-mon/0.3/libexec/jvm-mon.js:150:9)
    at Timeout._repeat (/usr/local/Cellar/jvm-mon/0.3/libexec/jvm-mon.js:204:5)
    at Timeout.wrapper [as _onTimeout] (timers.js:408:11)
    at tryOnTimeout (timers.js:224:11)
    at Timer.listOnTimeout (timers.js:198:5)

Cannot find module jvm-mon.js on Ubuntu 16.04

Hey,

I downloaded your tar, extracted it, did the configuration for Java, and when I executed jvm-mon, here is the error I got :

OpenJDK 64-Bit Server VM warning: You have loaded library /home/tristan/libj2v8_linux_x86_64.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.

node.js:376
        callback();
        ^
module.js:341: Error: Cannot find module '/home/tristan/Téléchargements/jvm-mon-0.1/bin/src/dist/jvm-mon.js'

Refresh list of JVMs

So that newly started processes also appear in the list and exited processes disappear.
Atm it only shows processes that were already running.

SyntaxError: Unexpected token =

(base) ➜ jvm-mon git:(master) ✗ ./gradlew npmDeps

Task :npmDeps
npm WARN saveError ENOENT: no such file or directory, open '/Users/develop/jvm-mon/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/develop/jvm-mon/package.json'
npm WARN jvm-mon No description
npm WARN jvm-mon No repository field.
npm WARN jvm-mon No README data
npm WARN jvm-mon No license field.

3 packages are looking for funding
run npm fund for details

BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed
(base) ➜ jvm-mon git:(master) ✗ ./build/install/jvm-mon/bin/jvm-mon
java.io.IOException: Management agent not found
at com.jvmtop.openjdk.tools.LocalVirtualMachine.loadManagementAgent(LocalVirtualMachine.java:365)
at com.jvmtop.openjdk.tools.LocalVirtualMachine.startManagementAgent(LocalVirtualMachine.java:141)
at com.jvmtop.openjdk.tools.ProxyClient.tryConnect(ProxyClient.java:372)
at com.jvmtop.openjdk.tools.ProxyClient.connect(ProxyClient.java:354)
at com.jvmtop.monitor.VMInfo.attachToVM(VMInfo.java:219)
at com.jvmtop.monitor.VMInfo.processNewVM(VMInfo.java:186)
at com.jvmtop.view.VMOverviewView.scanForNewVMs(VMOverviewView.java:176)
at jvmmon.JvmStats.update(JvmStats.kt:32)
at jvmmon.JvmStats.update$default(JvmStats.kt:31)
at jvmmon.JvmStats.(JvmStats.kt:15)
at JvmMon.(JvmMon.kt:12)
at JvmMon$Companion.main(JvmMon.kt:28)
at JvmMon.main(JvmMon.kt)
java.io.IOException: Management agent not found
at com.jvmtop.openjdk.tools.LocalVirtualMachine.loadManagementAgent(LocalVirtualMachine.java:365)
at com.jvmtop.openjdk.tools.LocalVirtualMachine.startManagementAgent(LocalVirtualMachine.java:141)
at com.jvmtop.openjdk.tools.ProxyClient.tryConnect(ProxyClient.java:372)
at com.jvmtop.openjdk.tools.ProxyClient.connect(ProxyClient.java:354)
at com.jvmtop.monitor.VMInfo.attachToVM(VMInfo.java:219)
at com.jvmtop.monitor.VMInfo.processNewVM(VMInfo.java:186)
at com.jvmtop.view.VMOverviewView.scanForNewVMs(VMOverviewView.java:176)
at jvmmon.JvmStats.update(JvmStats.kt:32)
at jvmmon.JvmStats.update$default(JvmStats.kt:31)
at jvmmon.JvmStats.(JvmStats.kt:15)
at JvmMon.(JvmMon.kt:12)
at JvmMon$Companion.main(JvmMon.kt:28)
at JvmMon.main(JvmMon.kt)
java.io.IOException: Management agent not found
at com.jvmtop.openjdk.tools.LocalVirtualMachine.loadManagementAgent(LocalVirtualMachine.java:365)
at com.jvmtop.openjdk.tools.LocalVirtualMachine.startManagementAgent(LocalVirtualMachine.java:141)
at com.jvmtop.openjdk.tools.ProxyClient.tryConnect(ProxyClient.java:372)
at com.jvmtop.openjdk.tools.ProxyClient.connect(ProxyClient.java:354)
at com.jvmtop.monitor.VMInfo.attachToVM(VMInfo.java:219)
at com.jvmtop.monitor.VMInfo.processNewVM(VMInfo.java:186)
at com.jvmtop.view.VMOverviewView.scanForNewVMs(VMOverviewView.java:176)
at jvmmon.JvmStats.update(JvmStats.kt:32)
at jvmmon.JvmStats.update$default(JvmStats.kt:31)
at jvmmon.JvmStats.(JvmStats.kt:15)
at JvmMon.(JvmMon.kt:12)
at JvmMon$Companion.main(JvmMon.kt:28)
at JvmMon.main(JvmMon.kt)

node.js:376
callback();
^
/Users/develop/jvm-mon/build/install/jvm-mon/node_modules/marked-terminal/index.cjs:23: SyntaxError: Unexpected token =
(base) ➜ jvm-mon git:(master) ✗ SyntaxError: Unexpected token =

Windows build

Should be a matter of adding the right J2V8 dependency

Doesn't work when not run from within the exploded zip/tar

$ opt/jvm-mon-0.1/bin/jvm-mon
objc[39393]: Class JavaLaunchHelper is implemented in both /Users/dnw/.jenv/versions/1.8/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

node.js:376
        callback();
        ^
module.js:341: Error: Cannot find module '/Users/dnw/opt/jvm-mon-0.1/bin/src/dist/jvm-mon.js'

$ cd opt/jvm-mon-0.1
$ bin/jvm-mon
objc[39418]: Class JavaLaunchHelper is implemented in both /Users/dnw/.jenv/versions/1.8/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.~
$ # that worked

Calculating values for heap usage for plotting the graph

How can I get plotted values of heap usage graph in text file ( possibly comma separated ) ?
Also, I couldn't understand how exactly are you getting/calculating those values for plotting ? Can you please tell this approach, that would be more beneficial for me.
Thanks in advance, means a lot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.