Home

Awesome

grmon

Command line monitoring for goroutines

<p align="center"><img src="https://bradley.codes/static/img/grmon.gif" alt="grmon"/></p>

Install

go get -u github.com/bcicen/grmon

Usage

Simply import and call grmon.Start() somewhere in your code:

import "github.com/bcicen/grmon/agent"
...
grmon.Start()

alternatively, you may just start the pprof server directly:

import (
	"net/http"
	_ "net/http/pprof"
)
...
go http.ListenAndServe(":1234", nil)

now grmon can connect to the running program:

grmon

By default, grmon will automatically refresh every 5s. Pause automatic refresh(p) to enable the cursor and expand the full trace for a selected goroutine(<enter>).

Keybindings

KeyAction
rmanually refresh
ppause/unpause automatic updates
stoggle sort column and refresh
ffilter by keyword
<up>,<down>,j,kmove cursor position
<enter>,oexpand trace under cursor
topen trace in full screen mode
qexit grmon

Options

OptionDescriptionDefault
-itime in seconds between refresh, 0 to disable5
-hosttarget hostlocalhost:1234
-endpointtarget endpoint path/debug/pprof

Roadmap