mirror of
https://github.com/mudler/edgevpn.git
synced 2025-09-26 21:01:44 +08:00
17 lines
606 B
Bash
17 lines
606 B
Bash
#!/bin/bash
|
|
# Collect debug data.
|
|
# To run with edgevpn, run with --debug and --api flags on.
|
|
# Note: requires https://github.com/whyrusleeping/stackparse for parsing goroutine debug stacks
|
|
|
|
mkdir collect
|
|
((count=1))
|
|
while true; do
|
|
(( count = count + 1))
|
|
curl http://localhost:8080/debug/pprof/heap > collect/heap$count
|
|
curl 'http://localhost:8080/debug/pprof/goroutine' > collect/goroutine$count
|
|
curl 'http://localhost:8080/debug/pprof/goroutine?debug=2' > collect/goroutine_debug_$count
|
|
stackparse --summary collect/goroutine_debug_$count > collect/goroutine_debug_${count}_summary
|
|
sleep 60
|
|
done
|
|
|