cloudfoundry / loggregator-release

Cloud Native Logging

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pprof default port question

scottillogical opened this issue · comments

Hey everyone, previously I've been able to get a pprof dump easily because pprof was set up on port 6060 in loggregator somewhat recently it changed to 0 https://github.com/cloudfoundry/loggregator-release/blob/develop/jobs/doppler/spec#L58. in this commit b62e8ee Is it correct that in newer versions operators need to redeploy to enable this? cc @wfernandes (sorry for some somewhat obvious questions)

Also https://github.com/cloudfoundry/loggregator/blob/master/profiler/server.go doesn't appear to check to see if the port is set to >0 before starting, so I'm curious how that works when it is set to 0? so if pprof it is indeed disabled by default I'm curious why and how that works with my reading of the profiler code in loggregator.

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/156309143

The labels on this github issue will be updated when the story is started.

@scottschulthess we changed the port to 0 to cause the pprof server to start on a random port. Setting to 0 does not disable the pprof server.

Since we start on a random port you would need to use lsof to find the pprof port in order to use it. An example of how to do this would be, as sudo, lsof -c doppler | grep LISTEN.

@bradylove that's awsome, thank you for the quick explanation!
should I file a separate issue to update https://github.com/cloudfoundry/loggregator-release/wiki/FAQ

@scottschulthess that would be great, thank you.