You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.9 KiB
2.9 KiB
Runtime command socket for debugging purpose
Goal
Dataplaneapi provides a command socket for debugging purpose.
The path for this socket can be defined :
- as dataplaneapi process argument (--debug-socket-path). Refer to dataplaneapi README
- in the dataplaneapi configuration file. Refer to configuration file
Note : if --debug-socket-path* is not set, the command socket will not run.
Check the socket path at start up
You can check the socket path when starting dataplaneapi in the logs:
"level":"info","msg":"-- command socket Starting on /path/to/dataplane-debug.sock","time":"2023-09-13T11:44:08+02:00"}
Help
To display the available comands:
echo "help" | socat - /path/to/dataplane-debug.sock
will output:
Dataplaneapi runtime commands:
conf show HAProxy configuration
goroutines display number of goroutines
stack output stack trace
version show dataplaneapi version
pprof pprof dumps
dapiconf show dataplaneapi configuration
type help <command> for more info
To get more info on a command, for example on the conf
command:
echo "help conf" | socat - /path/to/dataplane-debug.sock
will output:
Dataplaneapi runtime
command conf:
conf show HAProxy current raw configuration
conf raw version [transactionID] show HAProxy raw configuration for version (transactionID is optional default "" (for a transactionID, put '0' for version))
conf structured show HAProxy current structured configuration
conf structured version [transactionID] show HAProxy structured configuration for version (transactionID is optional default "" (for a transactionID, put '0' for version))
Available commands
-conf
to show the HAProxy configuration (possibly for version/transaction):
conf
: for current raw versionconf raw
: for current raw versionconf structured
for current structured version Addingversion [transactionID]
toconf raw
orconf structured
allow to show the configuration for a given version or transaction. Note that for a transactionID, version should be 0, for example : conf raw 0 123-456-789dapiconf
for the dataplaneapi configurationgouroutines
for the number of goroutinesstack
for the stack traceversion
for the dataplaneapi versionpprof
for pprof dumps
More info for : pprof
To have some examples on how to use pprof, the following command will give you some good guidance:
echo "pprof examples" | socat - /path/to/dataplane-debug.sock
More info for: dapiconf
dapiconf
dumps the Configuration. You can find an example of the output, when the dataplane is run with -f example-full.yaml
dapiconf output