Comments (1)
You might try to run the commands against a process that does not have the gops agent running.
This is not clear from the Github README.md but it is mentioned in the help:
> gops help
gops is a tool to list and diagnose Go processes.
Usage:
gops <cmd> <pid|addr> ...
gops <pid> # displays process info
gops help # displays this help message
Commands:
stack Prints the stack trace.
gc Runs the garbage collector and blocks until successful.
setgc Sets the garbage collection target percentage.
memstats Prints the allocation and garbage collection stats.
version Prints the Go version used to build the program.
stats Prints runtime stats.
trace Runs the runtime tracer for 5 secs and launches "go tool trace".
pprof-heap Reads the heap profile and launches "go tool pprof".
pprof-cpu Reads the CPU profile and launches "go tool pprof".
All commands require the agent running on the Go process.
"*" indicates the process is running the agent.
I am referring to the following part All commands require the agent running on the Go process.
When you run gops
against a process that has the agent running you will see a local/remote
field reported. That field contains the port gops
connects against when running e.g. gops stack
> gops 64646 (1) 10:01:32
parent PID: 64507
threads: 7
memory usage: 0.019%
cpu usage: 0.000%
username: mbukowski
cmd+args: /tmp/go-build1553357288/b001/exe/main
elapsed time: 04:16
local/remote: 127.0.0.1:35097 <-> 0.0.0.0:0 (LISTEN)
In contrast a process without the agent running doesn't report local/remote
> gops 39343 10:02:00
parent PID: 15306
threads: 9
memory usage: 0.038%
cpu usage: 0.000%
username: mbukowski
cmd+args: starlark
elapsed time: 01-22:10:03
You can running gops
against the pid of go run github.com/mrbuk/hello-gops
and it should work.
from gops.
Related Issues (20)
- Gops hangs if there are too many Go processes to examine HOT 17
- can not install binary file to gopath/bin
- Alpine Couldn't resolve addr or pid 1 to TCPAddress: couldn't get port for PID 1: open /root/.config/gops/1: no such file or directory HOT 1
- Amazon triple containing
- Stacktrace in 'debug=1' format
- Install failed HOT 2
- osx: no such file or directory: /src HOT 1
- gops crashes on macos without a CLI command on startup HOT 1
- gops does not validate time duration parameter HOT 2
- improve CI/CD release process with GitHub Actions and GoReleaser
- go get failed in m1
- run gops panic HOT 3
- gops can not list process in Mac book with m1 chip HOT 8
- Couldn't resolve addr or pid <pid> to TCPAddress HOT 2
- gops depends on the now retracted github.com/shirou/gopsutil v3.22.11 HOT 1
- json output?
- Turning off the GC via setgc is cumbersome
- The reported CPU usage is much higher or lower than top reported value?
- Any restrictions on rootless containers?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gops.