A Go process is running. I want to
If you are using net/http you can access the goroutines via the debug handlers. If you look at the following source
http://golang.org/src/pkg/runtime/pprof/pprof.go
You will see the profile, goroutineProfile
, on line 62. This profile writes out via writeGoroutine
. If writeGoroutine is called with debug >= 2 then it will write out all goroutines.
You should be able to curl http://localhost:
to get all goroutines dumped. Unfortunately I didn't see any references to signal handlers that would call that code but you can look at references to how pprof makes use of runtime.Stack
in the source above to implement this yourself pretty easily.