Categorygithub.com/bcicen/grmon
repositorypackage
0.0.0-20211013120613-63facda35286
Repository: https://github.com/bcicen/grmon.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

grmon

Command line monitoring for goroutines

grmon

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

  • Hierarchal/tree display