LinuxCommandLibrary

gops

Go process diagnostic tool

TLDR

List Go processes

$ gops
copy
Show process details
$ gops [pid]
copy
Dump stack trace
$ gops stack [pid]
copy
Memory statistics
$ gops memstats [pid]
copy
CPU profile
$ gops pprof-cpu [pid]
copy

SYNOPSIS

gops [command] [pid]

DESCRIPTION

gops lists and diagnoses Go processes running on the system. It identifies Go programs and provides debugging commands including stack traces, memory statistics, and CPU/heap profiling.
For full diagnostic capabilities, the gops agent must be imported in target programs. Basic process identification works without the agent.

PARAMETERS

PID

Process ID.
stack PID
Print stack trace.
memstats PID
Show memory stats.
pprof-cpu PID
CPU profile.
pprof-heap PID
Heap profile.
gc PID
Trigger garbage collection.
--help
Display help information.

CAVEATS

Full features need agent imported. Works with compatible Go versions. Some info from /proc.

HISTORY

gops was created by Jaana Dogan at Google to provide a diagnostic tool for Go processes.

SEE ALSO

go-tool(1), pprof(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community