Open ReasonablyAnon opened 4 years ago
Hi,
It gets memory values from Java itself using [Runtime](https://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#totalMemory()): https://github.com/ajermakovics/jvm-mon/blob/master/jvm-mon-go/src/main/java/jvmmon/core/JvmMon.java#L32
If you are running 0.3 then you could add some code to write values into a text file:
https://github.com/ajermakovics/jvm-mon/blob/master/src/dist/jvm-mon.js#L142
there already should be a jvm-mon.js
file in your install.
Thank you so much for the reply.
I mean are you calculating those values after GC happens or before GC happens. At what point of process , are you determining to get that heap usage value during the process is running ? Thats why, you are able to get many heap usage values 'throughout the whole process' for plotting right ? To get various heap usage values thoughout the process, that logic, I am trying to understand.
Ah, ok. It just polls memory usage every 1 second.
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.