3

I am trying to use the heap and jstat commands to analyze heap usage by the different IDE and programs using Java, as my machine is incredibly slow.

I have 16 GIG Ram, my min Heap is 252MB, my max Heap is 3,9 Gig. Now I want to know the heap usage by different programs.

jmap was experimental and removed in Release 60, can you kindly tell me if there is

1) a way to use jmap in Release 144 using Java Advanced Management Console? If so, how?

2) An alternative program / command line manager by a third party to analyze Java heap usage?

3) Would Java Usage Tracker be an alternative? If so, what would I need to consider?

Thank you.

BR, SN

trincot
  • 317,000
  • 35
  • 244
  • 286
Smart Geek
  • 37
  • 1
  • 4

1 Answers1

0

You can do a thread dump in linux - kill -3 [java-process-number], the thread dump will appear in the log file of the process. In the end of the thread dump you will see some statistic about the heap usage. example:

Heap
 garbage-first heap   total 524288K, used 14336K [0x00000007a0000000, 0x00000007a0101000, 0x00000007c0000000)
  region size 1024K, 15 young (15360K), 0 survivors (0K)
 Metaspace       used 8584K, capacity 8688K, committed 8832K, reserved 1056768K
 class space    used 1022K, capacity 1080K, committed 1152K, reserved 1048576K
Gal Shaboodi
  • 744
  • 1
  • 7
  • 25
  • see also https://stackoverflow.com/questions/407612/how-to-get-a-thread-and-heap-dump-of-a-java-process-on-windows-thats-not-runnin – Gal Shaboodi Nov 17 '17 at 13:27