First, enable tracing of GC events in your application using the GODEBUG variable:
GODEBUG=gctrace=1
Redirect standard error to a file:
$ myapp 2> stderr.log
Now you should be able to visualize GC events in your terminal:
$ tail -f stderr.log | gcterm
Currently, only applications built with Go 1.6 and Go 1.7 are supported.