Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- This PR adds 5 new metrics (/jemalloc, /state, /health, /debug/vars, /metrics) to be collected when running the `debuginfo` - the flag `-p` has been changed to `-m` to reflect the change. This new flag will let you pick up one or multiple metrics/pprof to be collected: ``` -m, --metrics strings List of metrics & profile to dump in the report. (default [jemalloc,state,health,vars,metrics,heap,cpu_profile,trace,goroutine,threadcreate,block,mutex]) ``` - default value of `-s` flag is now 30sec since it requires 30s to collect a cpu profile - when saving the metric/profile - it will log the metric/profile name and the path where it's saving to. - added new flag for time based profiles that are cpu and trace profiles: ``` -c, --cron_pprof strings time-based pprof (default [cpu_profile,trace]) ``` output of running the `debuginfo` command: ``` dgraph debuginfo -s 30 I0305 21:01:44.730085 10587 run.go:126] using directory /tmp/dgraph-debuginfo041885197 for debug info dump. I0305 21:01:44.730251 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/jemalloc I0305 21:01:44.730261 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.731077 10587 debugging.go:51] saving jemalloc metric in /tmp/dgraph-debuginfo041885197/alpha_jemalloc.gz I0305 21:01:44.731086 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/state I0305 21:01:44.731092 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.731720 10587 debugging.go:51] saving state metric in /tmp/dgraph-debuginfo041885197/alpha_state.gz I0305 21:01:44.731731 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/health I0305 21:01:44.731736 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.732048 10587 debugging.go:51] saving health metric in /tmp/dgraph-debuginfo041885197/alpha_health.gz I0305 21:01:44.732058 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/vars I0305 21:01:44.732065 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.732557 10587 debugging.go:51] saving vars metric in /tmp/dgraph-debuginfo041885197/alpha_vars.gz I0305 21:01:44.732568 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/metrics I0305 21:01:44.732573 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.734904 10587 debugging.go:51] saving metrics metric in /tmp/dgraph-debuginfo041885197/alpha_metrics.gz I0305 21:01:44.734912 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/pprof/heap I0305 21:01:44.734917 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.738036 10587 debugging.go:51] saving heap metric in /tmp/dgraph-debuginfo041885197/alpha_heap.gz I0305 21:01:44.738048 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/pprof/goroutine?debug=2 I0305 21:01:44.738057 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.739136 10587 debugging.go:51] saving goroutine metric in /tmp/dgraph-debuginfo041885197/alpha_goroutine.gz I0305 21:01:44.739145 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/pprof/threadcreate I0305 21:01:44.739151 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.740182 10587 debugging.go:51] saving threadcreate metric in /tmp/dgraph-debuginfo041885197/alpha_threadcreate.gz I0305 21:01:44.740192 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/pprof/block I0305 21:01:44.740198 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.741154 10587 debugging.go:51] saving block metric in /tmp/dgraph-debuginfo041885197/alpha_block.gz I0305 21:01:44.741163 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/pprof/mutex I0305 21:01:44.741169 10587 debugging.go:76] please wait... (30s) I0305 21:01:44.742330 10587 debugging.go:51] saving mutex metric in /tmp/dgraph-debuginfo041885197/alpha_mutex.gz I0305 21:01:44.742341 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/pprof/profile?seconds=30s I0305 21:01:44.742348 10587 debugging.go:76] please wait... (30s) I0305 21:02:14.812492 10587 debugging.go:63] saving cpu_profile metric in /tmp/dgraph-debuginfo041885197/alpha_cpu_profile.gz I0305 21:02:14.812570 10587 debugging.go:74] fetching information over HTTP from http://localhost:8080/debug/pprof/trace?seconds=30s I0305 21:02:14.812596 10587 debugging.go:76] please wait... (30s) I0305 21:02:15.816449 10587 debugging.go:63] saving trace metric in /tmp/dgraph-debuginfo041885197/alpha_trace.gz I0305 21:02:15.842375 10587 run.go:159] Debuginfo archive successful: dgraph-debuginfo041885197.tar.gz ``` (cherry picked from commit 79ada0e)
- Loading branch information