Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculating values for heap usage for plotting the graph #31

Open
ReasonablyAnon opened this issue May 2, 2020 · 3 comments
Open

Calculating values for heap usage for plotting the graph #31

ReasonablyAnon opened this issue May 2, 2020 · 3 comments

Comments

@ReasonablyAnon
Copy link

ReasonablyAnon commented May 2, 2020

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.

@ajermakovics
Copy link
Owner

Hi,

It gets memory values from Java itself using Runtime:
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.

@ReasonablyAnon
Copy link
Author

ReasonablyAnon commented May 2, 2020

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.

@ajermakovics
Copy link
Owner

Ah, ok. It just polls memory usage every 1 second.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants