/sys/pprof
The /sys/pprof endpoint is used to query. The response returned by these endpoints are equivalent to those returned by the http/pprof package.
Index
This endpoint returns an HTML page listing the available profiles.
GET
/sys/pprof/
Sample request
$ curl \
--header "X-Vault-Token: ..." \
http://127.0.0.1:8200/v1/sys/pprof/Allocs
This endpoint returns a sampling of historical memory allocations over the life of the program.
GET
/sys/pprof/allocs
Sample request
$ curl \
--header "X-Vault-Token: ..." \
http://127.0.0.1:8200/v1/sys/pprof/allocsBlock
This endpoint returns a sampling of goroutines involved in blocking on synchronization primitives.
It is included for completeness, but since Vault doesn't normally enable collection of this data, it won't return anything useful with the standard Vault binary.
GET
/sys/pprof/block
Sample request
$ curl \
--header "X-Vault-Token: ..." \
http://127.0.0.1:8200/v1/sys/pprof/blockCmdline
This endpoint returns the running program's command line, with arguments separated by NUL bytes.
GET
/sys/pprof/cmdline
Sample request
$ curl \
--header "X-Vault-Token: ..." \
http://127.0.0.1:8200/v1/sys/pprof/cmdlineGoroutine
This endpoint returns stack traces of all current goroutines.
GET
/sys/pprof/goroutine
Parameters
debug(int: 0)- Specifies special arguments for the collection. A value of2results in the stack traces being returned as text instead of the default pprof format.
Sample request
$ curl \
--header "X-Vault-Token: ..." \
http://127.0.0.1:8200/v1/sys/pprof/goroutineHeap
This endpoint returns a sampling of memory allocations of live object.
GET
/sys/pprof/heap
Sample request
$ curl \
--header "X-Vault-Token: ..." \
http://127.0.0.1:8200/v1/sys/pprof/heapMutex
This endpoint returns a sampling of goroutines holding contended mutexes.
It is included for completeness, but since Vault doesn't normally enable collection of this data, it won't return anything useful with the standard Vault binary.
GET
/sys/pprof/mutex
Sample request
$ curl \
--header "X-Vault-Token: ..." \
http://127.0.0.1:8200/v1/sys/pprof/mutexProfile
This endpoint returns a pprof-formatted cpu profile payload. Profiling lasts for duration specified in seconds GET parameter, or for 30 seconds if not specified.
GET
/sys/pprof/profile
Parameters
seconds(int: 30)- Specifies the duration to run the profiling command. This value is specified as a query parameter.
Sample request
$ curl \
--header "X-Vault-Token: ..." \
http://127.0.0.1:8200/v1/sys/pprof/profileSymbol
This endpoint returns the program counters listed in the request.
GET
/sys/pprof/symbol
Sample request
$ curl \
--header "X-Vault-Token: ..." \
http://127.0.0.1:8200/v1/sys/pprof/symbolThreadcreate
This endpoint returns stack traces of goroutines that led to the creation of new OS threads.
GET
/sys/pprof/threadcreate
Sample request
$ curl \
--header "X-Vault-Token: ..." \
http://127.0.0.1:8200/v1/sys/pprof/threadcreateTrace
This endpoint returns the execution trace in binary form. Tracing lasts for duration specified in seconds GET parameter, or for 1 second if not specified.
GET
/sys/pprof/trace
Parameters
seconds(int: 1)- Specifies the duration to run the tracing command. This value is specified as a query parameter.
Sample request
$ curl \
--header "X-Vault-Token: ..." \
http://127.0.0.1:8200/v1/sys/pprof/traceLast updated