From 5fc3d2a2334eff9372c483ed66e5edbcba48ee04 Mon Sep 17 00:00:00 2001 From: Stefan Bueringer Date: Mon, 25 Mar 2024 17:21:49 +0100 Subject: [PATCH] Add docs on how to get goroutine dump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Büringer buringerst@vmware.com --- docs/book/src/tasks/diagnostics.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/book/src/tasks/diagnostics.md b/docs/book/src/tasks/diagnostics.md index 713048441686..af7f7d60cf54 100644 --- a/docs/book/src/tasks/diagnostics.md +++ b/docs/book/src/tasks/diagnostics.md @@ -136,6 +136,11 @@ kubectl -n capi-system port-forward deployments/capi-controller-manager 8443 # Terminal 2 TOKEN=$(kubectl create token default) + +# Get a goroutine dump +curl "https://localhost:8443/debug/pprof/goroutine?debug=2" --header "Authorization: Bearer $TOKEN" -k > ./goroutine.txt + +# Get a profile curl "https://localhost:8443/debug/pprof/profile?seconds=10" --header "Authorization: Bearer $TOKEN" -k > ./profile.out go tool pprof -http=:8080 ./profile.out ```