google/gops

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

kokizzu opened this issue · 1 comments

gops build with export CGO_ENABLED=0, some command works, some command doesn't work:

$ uname -a 
Linux phoenix-7bd56c4576-7k8th 4.19.112+ #1 SMP Fri Sep 4 12:00:04 PDT 2020 x86_64 Linux

$ gops 
319 41 gops     go1.15.6 /tmp/gops
1   0  phoenix  go1.13.5 /usr/local/bin/phoenix

$ gops 1
threads:        31
memory usage:   0.009%
cpu usage:      0.160%
username:       root
cmd+args:       phoenix
elapsed time:   07-18:32:21
local/remote:   :::8123 <-> :::0 (LISTEN)
local/remote:   10.74.28.74:38295 <-> 172.22.72.122:8125 (NONE)

$ gops memstats 1
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

$ gops stack 1
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

$ gops pprof-heap 1
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

nevermind, it has to recompile with correct import to make this work "github.com/google/gops/agent"