How do I get a Java Heap from the Java Functions Worker?

LPal :

I'd like to get a heap dump from my Java Function running in Azure. The Kudu tools in Azure do let me get a windows mini-dump but it's not in the hprof format so I have no idea how to inspect it.

KetanChawda-MSFT :

I tried with the below command in KUDU console and it captured a dump for me:

D:\home> cd D:\Program Files\Java\jdk1.7.0_80\bin

D:\Program Files\Java\jdk1.7.0_80\bin> jmap dump:live,format=b,file=D:\home\dumps\dump.hprof <PID>

NOTE:
file = path of the dump file needs to save,
PID: Java process ID (Get it from https://<FunctionAppName>.scm.azurewebsites.net/ProcessExplorer/)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=160169&siteId=1