Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
development:java:heap [2019/04/30 14:16]
preb
development:java:heap [2019/04/30 15:17] (current)
preb
Line 6: Line 6:
 <​code>​ <​code>​
 jstat -gc <pid> | tail -1 | awk '​{split($0,​a,"​ "); sum=((a[3]+a[4]+a[6]+a[8])/​1024);​ print sum " Mb"​}'​ jstat -gc <pid> | tail -1 | awk '​{split($0,​a,"​ "); sum=((a[3]+a[4]+a[6]+a[8])/​1024);​ print sum " Mb"​}'​
 +</​code>​
 +
 +Find how much heap is in use with Jmap. \\
 +We simply add the used values.
 +<​code>​
 +jmap -heap <pid> | grep "​used ​   " | awk '​{n+=$3} END {print (n/​1048576)"​ Mb"​}'​
 </​code>​ </​code>​
  • development/java/heap.txt
  • Last modified: 2019/04/30 15:17
  • by preb