New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugtool: add mode to retrieve pprof traces #10666
Conversation
test-me-please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small nit
bugtool/cmd/root.go
Outdated
) | ||
|
||
func init() { | ||
BugtoolRootCmd.Flags().BoolVar(&archive, "archive", true, "Create archive when false skips deletion of the output directory") | ||
BugtoolRootCmd.Flags().BoolVar(&getPProf, "get-pprof", false, "When set, only gets the pprof traces from the cilium-agent binary") | ||
BugtoolRootCmd.Flags().IntVar(&pprofPort, "pprof-port", 6060, "Port for which pprof server is exposed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
BugtoolRootCmd.Flags().IntVar(&pprofPort, "pprof-port", 6060, "Port for which pprof server is exposed") | |
BugtoolRootCmd.Flags().IntVar(&pprofPort, "pprof-port", 6060, "Port on which pprof server is exposed") |
test-me-please |
Signed-off-by: André Martins <andre@cilium.io>
Retrieving pprof traces on a live cluster is extremely useful. Unfortunately this requires curl, or any http client, to be installed. Enabling this in the bugtool will make the capture of such pprof traces effortless for the user. By simply executing the following command in the cilium pod, the user will have an archive with the pprof traces for 60 seconds. ``` $ kubectl exec -ti -n kube-system <cilium-pod> -- ./cilium-bugtool --get-pprof --pprof-trace-seconds 60 ARCHIVE at /tmp/cilium-bugtool-20200323-141313.342+0000-UTC-490106087.tar $ kubectl cp -n kube-system <cilium-pod>:/tmp/cilium-bugtool-20200323-141313.342+0000-UTC-490106087.tar ./ ``` Signed-off-by: André Martins <andre@cilium.io>
test-me-please |
Not sure about the test failure, but it looks like a flake? https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-Validated/18131/ |
test-me-please |
1 similar comment
test-me-please |
bugtool: add mode to retrieve pprof traces
Retrieving pprof traces on a live cluster is extremely useful.
Unfortunately this requires curl, or any http client, to be installed.
Enabling this in the bugtool will make the capture of such pprof
traces effortless for the user. By simply executing the following
command in the cilium pod, the user will have an archive with the pprof
traces for 60 seconds.
Signed-off-by: André Martins andre@cilium.io