You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gops memstats 27281
couldn't get port by PID: dial tcp 127.0.0.1:0: connect: can't assign requested address
when i use addr,long time no response.
i use go version go1.10 darwin/amd64.
i remember it works before,perhaps i updated the go version.
Me too
$ gops pprof-cpu 6433
Profiling CPU now, will take 30 secs...
couldn't get port by PID: dial tcp 127.0.0.1:0: connect: can't assign requested address
1、golang version
2、quote "github.com/google/gops/agent" in your code;
3、add code in you main func, such as:
if err := agent.Listen(agent.Options{}); err != nil {
log.Fatal(err)
}
4、go build your code
5、run your binary program
6、gops option according to gops doc
to use gops, you MUST set env of GOPS_CONFIG_DIR, otherwise, it use $HOME/.config for linux system, in case the dir does not exist, gops will mkdir, but for which you might have no permission to mkdir
Activity
ashishchandra2017 commentedon Apr 9, 2018
Me too
$ gops pprof-cpu 6433
Profiling CPU now, will take 30 secs...
couldn't get port by PID: dial tcp 127.0.0.1:0: connect: can't assign requested address
19920716 commentedon Jul 7, 2018
me too!!!
But no one seems to care!!!
Crazy-Kitty commentedon Oct 26, 2018
1、golang version
2、quote "github.com/google/gops/agent" in your code;
3、add code in you main func, such as:
if err := agent.Listen(agent.Options{}); err != nil {
log.Fatal(err)
}
4、go build your code
5、run your binary program
6、gops option according to gops doc
westwin commentedon Nov 27, 2019
to use gops, you MUST set env of GOPS_CONFIG_DIR, otherwise, it use $HOME/.config for linux system, in case the dir does not exist, gops will mkdir, but for which you might have no permission to mkdir
func PIDFile(pid int) (string, error) {
gopsdir, err := ConfigDir()
if err != nil {
return "", err
}
return fmt.Sprintf("%s/%d", gopsdir, pid), nil
}