Reference
get weight
On this page
Display the initial and current weight of a server.
Description Jump to heading
Use get weight to display the initial and current weight of a given server. This value may have been changed by the set weight command.
Examples Jump to heading
In the example below, the backend has two servers, each with an assigned weight of 100:
haproxybackend be_serversserver server1 127.0.0.1:8080 check weight 100server server2 127.0.0.1:8081 check weight 100
haproxybackend be_serversserver server1 127.0.0.1:8080 check weight 100server server2 127.0.0.1:8081 check weight 100
The get weight command displays the current weight of a given server and its initial value in parentheses.
The current value may have changed if the set weight command was called:
nixecho "get weight be_servers/server1" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
nixecho "get weight be_servers/server1" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
outputtext100 (initial 100)
outputtext100 (initial 100)
See also Jump to heading
Do you have any suggestions on how we can improve the content of this page?