百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

gmon

> 编程语言
开源

一个监控 goroutine 的 eBPF 工具

190 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

一个监控 goroutine 的 eBPF 工具

Goroutine MONitor (gmon)

gmon is a tool designed to monitor the creation and destruction of goroutines in a Go program, drawing inspiration from the presentation Real World Debugging with eBPF.

Prerequisites

  • amd64 (x86_64)
  • Linux Kernel 5.8+ since gmon uses BPF ring buffer
  • Target Go binary must be compiled with Go 1.23+ since gmon uses fixed offset to get goroutine ID

Usage

Usage of gmon:
  -level string
    	log level could be one of ["DEBUG" "INFO" "WARN" "ERROR"] (default "INFO")
  -metrics int
    	Port to be used for metrics server, /metrics endpoint (default 5500)
  -path string
    	Path to executable file to be monitored (required)
  -pid int
    	Useful when tracing programs that have many running instances
  -pprof int
    	Port to be used for pprof server. If 0, pprof server is not started
  -trace string
    	Path to Go runtime/trace output

Demo

https://github.com/keisku/gmon/assets/41987730/838fa12d-d622-4ad6-a9f0-6aab88acec55

Stdout

gmon logs the creation of goroutines to stdout with stack traces.

…

OpenMetrics

gmon exposes the following metrics in the OpenMetrics format on the GET /metrics.

  • gmon_goroutine_creation
  • gmon_goroutine_exit
  • gmon_goroutine_uptime
…

Development

Follow the Docker installation guide to build and run tests.

bash
# Build and output the binary to ./bin
./gmon.sh build
# Build and install the binary to /usr/bin
./gmon.sh install
# Run tests
./gmon.sh test

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Goebpfgogolang

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言