I have 24 GB RAM on my server(RHEL) and have assigned 2 GB Xmx value to a Java process.
I need to check if this 2 GB is being consumed completely. Can I check the top command and see if this Java process is consuming 8.3% memory(ie: 2/24) and make an assumption that its using 2 GB at that point. If its less than 8.3%, then I am assuming that it has not reached 2 GB mark. Let me know if my assumption is wrong.