Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I download a heap dump to run pprof on later?

Tags:

go

pprof

I'm trying to find a way to store the heap data from pprof so that I can share it, view it later, attach to issues and so on. My attempts so far have not worked.

If I run

go tool pprof http://my-server/debug/pprof/heap and then run web, I get a full graph like I expect. However, If I dowload the file:

wget -O heapDump http://my-server/debug/pprof/heap

and try go tool pprof heapDump, it seems it can't do everything it needs to. I only get a very limited graph:

enter image description here

I have tried adding ?debug=1 and playing with different values, but none of them seem to work properly.

like image 587
captncraig Avatar asked Sep 06 '16 15:09

captncraig


1 Answers

go tool pprof -png http://my-server/debug/pprof/heap > out.png stores a proper graph for me in the out.png file.

like image 151
Haril Satra Avatar answered Nov 17 '22 23:11

Haril Satra