jvm-mon icon indicating copy to clipboard operation
jvm-mon copied to clipboard

Java 17 support?

Open szarza opened this issue 9 months ago • 6 comments

Very good job!. It's a very cool tool. Any shedule to support jdk 17? I've tested in a RHEL 8 server running Java 17 applications and jvm-mon shows no jvm running at all...

szarza avatar Mar 05 '25 11:03 szarza

Thanks! Does it work with the golang version ? With the golang version I can see Java 17 processes on Ubuntu. Also, are the jvms and jvm-mon running under the same user?

ajermakovics avatar Mar 19 '25 16:03 ajermakovics

As you can see, there are 3 jvms running in this RHEL 8 box. Image

but... ./jvm-mon-go doesn't see any

Image

szarza avatar Mar 20 '25 12:03 szarza

Interesting, though not sure if I can reproduce this. Anything useful in the log /tmp/jvm-mon_*.log?

Had a quick look at the library that reads JVMs. It looks for files in /tmp/hsperfdata_(user) directory. Does that dir exist and have files?

ajermakovics avatar Mar 20 '25 13:03 ajermakovics

Yes, there's a empty directory /tmp/hsperfdata_cestel. The content of jvm-mon_cestel.log file is:

2025/03/20 13:03:37 jvm-mon v 1.0-ea1
2025/03/20 13:03:37 Found JVMs:  0
2025/03/20 13:03:37 Server listening on port: 35561
2025/03/20 13:03:37 Embedded dir:  build/libs
2025/03/20 13:03:37 Found embeded jar file:  13473
2025/03/20 13:03:37 Created temp file  /tmp/jvm-mon-go.jar634325220

szarza avatar Mar 21 '25 08:03 szarza

I see, usually the hsperfdata directory should have a file for each jvm you are running. If it is empty then jvm-mon won't find them. One possibility is that hsperfdata is disabled by starting the jvm with -XX:+UsePerfData flag.

Are you running the jvms and jvm-mon as the same user?

ajermakovics avatar Mar 21 '25 15:03 ajermakovics

None of the JVMs are started with the -XX:+UsePerfData flag. All jvms are started with the same user.

szarza avatar Mar 24 '25 07:03 szarza