.TH hapc 1 .SH NAME hapc \- administrative commands for your haproxy service .SH SYNOPSIS .B hapc .B [options] [arguments] .SH DESCRIPTION .LP .I hapc configures the backends of an haproxy setup, so it is possible to put backend servers in maintenance gracefully. .SH "OPTIONS" .LP .I \-verbose|\-v .IP Display with a more verbose output. .SH "ACTIONS" .LP .B list\-backends .I [-l|--links] .IP List all available backends, asking through the haproxy socket file. .LP .B list\-frontends .IP List all available frontend as configured in the haproxy.cfg file. .LP .B list\-config\-backends .IP List all available backends as configured in the haproxy.cfg file. .LP .B list\-servers .I "[\-b|\-\-backend] " .I [\-d|\-\-details] .IP List all available servers for a given backend. With --details, the command shows the state of the servers (if they are active in the backend or not). .LP .B list\-connections .I "[\-b|\-\-backend] " .I "[\-s|\-\-server] " .IP Show the number of connections for a given backend and server. .LP .B enable\-server .I "[\-b|\-\-backend] " .I "[\-s|\-\-server] " .IP Set a server as ACTIVE in its backend. .LP .B drain\-server .I "[\-b|\-\-backend] " .I "[\-s|\-\-server] " .I "[\-w|\-\-wait]" .IP Gracefuly drain a server from its backend. If the \-\-wait option is added, then hapc waits for all connections to be closed before returning, with a timeout set to 60 seconds. .LP .B stop\-server .I "[\-b|\-\-backend] " .I "[\-s|\-\-server] " .IP Forceably remove a server from its backend, eventually killing existing connections. .LP .B check\-safe\-to\-remove .I "[\-b|\-\-backend] " .I "[\-s|\-\-server] " .IP Check if a server is safe to remove from its backend (ie: check if there's not existing connections to it). .LP .B reload\-haproxy .IP Reload haproxy. .SH LICENSE .IP This is released under the Apache-2.0 license. .SH AUTHORS .IP This utility has been written by Olivier Chaze and Thomas Goirand for internal use in the Infomaniak servers.