Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-11 Thread Siddhesh Divekar
Thanks Mhd and agree with the suggestion. However, we are trying to catch a bug which happens in production on k8s & hence trying to explore different options. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-11 Thread Mhd Shulhan
Pada tanggal Sab, 12 Sep 2020 08.52, Siddhesh Divekar < siddhesh.dive...@gmail.com> menulis: > In writing to a file option, we would periodically write the file as it > might turn out to be a huge file > for the entire life of the pod to flush at once > Maybe, the obvious solution here is not

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-11 Thread Siddhesh Divekar
In writing to a file option, we would periodically write the file as it might turn out to be a huge file for the entire life of the pod to flush at once. On Fri, Sep 11, 2020 at 6:32 PM Siddhesh Divekar wrote: > You need to write to a shared writable path that is global so when the pod >>

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-11 Thread Siddhesh Divekar
> > You need to write to a shared writable path that is global so when the pod > terminated the file is avail. That's a good idea, we can write to to a config map. The http should work too if you map the ports properly. You can be able to > access the port from outside the pod. This might not

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-11 Thread Robert Engels
You need to write to a shared writable path that is global so when the pod terminated the file is avail. The http should work too if you map the ports properly. You can be able to access the port from outside the pod. > On Sep 11, 2020, at 7:14 PM, Siddhesh Divekar > wrote: > >  > I went

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-11 Thread Siddhesh Divekar
I went through the suggested approaches and here are my thoughts. - runtime/trace.Start - The example in the doc https://golang.org/pkg/runtime/trace/ suggests adding os.Create("trace.out"), trace.Start & defer trace.Stop in the main before the application program gets started. In an environment

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-11 Thread Robert Engels
Please read golang.org/cmd/trace You need a trace file. There are many ways to capture one. > On Sep 11, 2020, at 12:09 PM, Siddhesh Divekar > wrote: > >  > Ok, let me get them working first. > > My concern with pprof is it has to be made part of my process. > We had an issue where user

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-11 Thread Siddhesh Divekar
Ok, let me get them working first. My concern with pprof is it has to be made part of my process. We had an issue where user requests were not reaching our http server itself. In this case what are my options if pprof server is not reachable when we hit the same issue again. Are there any other

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-11 Thread Robert Engels
I would start with making sure you can get the standard ‘go tool trace’ and ‘pprof’ working. Once you have those working ‘goanalyzer’ is an enhanced version. The docs are far more complete and substantial on the standard tools. > On Sep 11, 2020, at 1:37 AM, Siddhesh Divekar > wrote: > >

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-11 Thread Siddhesh Divekar
Is there any dependency on GOPATH while running `./goanalyzer binary trace-file` ? Also my goanalyzer is built on mac and am trying to look at trace file generated on ubuntu (shouldn't be a problem). ./goanalyzer ~/workspace/binary ~/workspace/trace 2020/09/10 23:27:32 Parsing trace...

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-10 Thread robert engels
goanalyzer = go tool trace The options to goanalyzer are the same as ‘go tool trace’ - the usage message is misleading in this way. By ‘map’ I mean expose the pprof port as you would any other port, and yes you use the net/http/pprof to start the internal webserver - you don’t need to create

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-10 Thread Siddhesh Divekar
Hi Robert, Laying down the steps to make sure I understood it correctly. You can map the port > What did you mean by above ? but might be easier to capture to a file via code and use goanalyzer on the > file > In this case I will do the following. a) Set up a webserver in my program for getting

Re: [go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-10 Thread Robert Engels
You can map the port but might be easier to capture to a file via code and use goanalyzer on the file. > On Sep 10, 2020, at 4:53 PM, Siddhesh Divekar > wrote: > >  > Hi, > > Has anyone tried running goanalyzer on golang process running inside k8s pod. > > If so can you point me to the

[go-nuts] Running goanalyzer on golang process running inside kubernetes pod

2020-09-10 Thread Siddhesh Divekar
Hi, Has anyone tried running goanalyzer on golang process running inside k8s pod. If so can you point me to the steps. -- -Siddhesh. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails