In HTOP you can see the RES value (resident size) which shows how much of your RAM your JVM process is really taking.
Now I want to get that value by only using pure Java. If you tell me it's just not possible, that's fine as well.
Let me explain all the attempts I made with an application that shows a RES value of 887M in htop:
Any ideas what else I could try?
Assuming you are running Linux, just read /proc/self/status
file and look for VmRSS:
line.
Or parse /proc/self/smaps
to get comprehensive memory information for the current process.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With