You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been experimenting with your API to include my server stats on a web app. I did notice that the memory reading was incorrect:
Actual value:
Value displayed:
I know someone already pointed this out in issue #19, and you explained that it was caused by the heap size being different than the actual memory size.
I have reviewed your source code, and it appears the issue comes from lines 15 to 17 in WebConsole-2.0-rev2\src\es\mesacarlos\webconsole\websocket\command\RamUsageCommand.java:
You see, maxMemory() is the maximum heap size, whereas freeMemory() is the free heap size memory. Therefore, in order to get usage, you need to modify the code to this:
This resolved my issue, as totalMemory() is the current heapsize, which is more often than not way lower than the actual heap limit:
Other than that, I love your plugin, and it has been exactly what I was looking for, so many thanks for making it 👍
Hope this could help !
The text was updated successfully, but these errors were encountered:
Thank you for your research and posting this issue!
I didn't notice the problem because I was running my server with -Xmx1G -Xms1G params, so every time I tested it it was OK because maxMemory() and totalMemory() were basically the same...
I'm releasing a new version now with this issue solved.
Thank you again!
I have been experimenting with your API to include my server stats on a web app. I did notice that the memory reading was incorrect:
Actual value:
Value displayed:
I know someone already pointed this out in issue #19, and you explained that it was caused by the heap size being different than the actual memory size.
I have reviewed your source code, and it appears the issue comes from lines 15 to 17 in WebConsole-2.0-rev2\src\es\mesacarlos\webconsole\websocket\command\RamUsageCommand.java:
You see, maxMemory() is the maximum heap size, whereas freeMemory() is the free heap size memory. Therefore, in order to get usage, you need to modify the code to this:
This resolved my issue, as totalMemory() is the current heapsize, which is more often than not way lower than the actual heap limit:
Other than that, I love your plugin, and it has been exactly what I was looking for, so many thanks for making it 👍
Hope this could help !
The text was updated successfully, but these errors were encountered: