Reference
show cli sockets
Display information about all CLI sockets defined in the configuration.
Description Jump to heading
The load balancer’s runtime API supports Unix domain sockets, as well as IPv4 and IPv6 network sockets for interprocess communication. Any of these sockets can be configured with different levels of administrative access, from unrestricted admin
to more limited operator
and user
roles.
Querying the runtime API with show cli sockets
will display information about any and all sockets available.
Examples Jump to heading
In the following examples, both configuration directives and query output are shown.
Single socket configuration Jump to heading
Example configuration file section with a single socket configured with admin
access:
haproxy
globalstats socket /var/run/hapee-2.9/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenersstats timeout 2m
haproxy
globalstats socket /var/run/hapee-2.9/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenersstats timeout 2m
Querying the load balancer’s domain or network socket with the string show cli sockets
will produce a list of all sockets in the running configuration, a single socket in this case.
nix
echo "show cli sockets" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
nix
echo "show cli sockets" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
outputtext
# socket lvl processesunix@/var/run/hapee-2.9/hapee-lb.sock admin allsockpair@6 admin 1
outputtext
# socket lvl processesunix@/var/run/hapee-2.9/hapee-lb.sock admin allsockpair@6 admin 1
Multiple socket configuration: Jump to heading
The load balancer supports having multiple domain and network sockets in a single configuration, with one or more levels of access.
Example configuration file section with multiple sockets configured with admin
, operator
and user
access levels:
haproxy
globalstats socket /var/run/hapee-2.9/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenersstats socket ipv4@127.0.0.1:9999 level operator expose-fd listenersstats socket ipv6@0:0:0:0:0:0:0:1:9966 level user expose-fd listenersstats timeout 2m
haproxy
globalstats socket /var/run/hapee-2.9/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenersstats socket ipv4@127.0.0.1:9999 level operator expose-fd listenersstats socket ipv6@0:0:0:0:0:0:0:1:9966 level user expose-fd listenersstats timeout 2m
Querying the load balancer’s domain or network socket with the string show cli sockets
will produce a list of all sockets in the running configuration.
nix
echo "show cli sockets" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
nix
echo "show cli sockets" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
outputtext
# socket lvl processesunix@/var/run/hapee-2.9/hapee-lb.sock admin allipv4@127.0.0.1:9999 operator allipv6@[::1]:9966 user allsockpair@7 admin 1
outputtext
# socket lvl processesunix@/var/run/hapee-2.9/hapee-lb.sock admin allipv4@127.0.0.1:9999 operator allipv6@[::1]:9966 user allsockpair@7 admin 1
Output | Description |
---|---|
unix@/var/run/hapee-2.9/hapee-lb.sock: |
Address of Unix domain socket |
ipv4@127.0.0.1:9999 |
Address and port of IPv4 (localhost) socket |
ipv6@[::1]:9966 |
Address and port of IPv6 (localhost) socket |
admin |
operator |
all |
processes upon which the socket is bound |
sockpair@
refers to the file descriptor of a connected unix socket or of a socketpair. During a connection, the backend creates a pair of connected sockets, and passes one of them over the file descriptor.
See also Jump to heading
Do you have any suggestions on how we can improve the content of this page?