Skip to content

Commit

Permalink
Merge pull request #10310 from sbueringer/pr-get-goroutine
Browse files Browse the repository at this point in the history
🌱 Add docs on how to get goroutine dump
  • Loading branch information
k8s-ci-robot authored Apr 3, 2024
2 parents c8575c9 + d269fb7 commit 210326f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/book/src/tasks/diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down

0 comments on commit 210326f

Please sign in to comment.