2
2
< html lang ="en ">
3
3
< head >
4
4
< meta charset ="utf-8 " />
5
- < title > HAProxy version 3.2-dev9-46 - Management Guide</ title >
5
+ < title > HAProxy version 3.2-dev10-29 - Management Guide</ title >
6
6
< link href ="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css " rel ="stylesheet " />
7
7
< link href ="https://raw.githubusercontent.com/thomaspark/bootswatch/v3.3.7/cerulean/bootstrap.min.css " rel ="stylesheet " />
8
8
< link href ="../css/page.css?0.4.2-15 " rel ="stylesheet " />
654
654
You can use < strong > left</ strong > and < strong > right</ strong > arrow keys to navigate between chapters.< br >
655
655
</ p >
656
656
< p class ="text-right ">
657
- < small > Converted with < a href ="https://github.com/cbonte/haproxy-dconv "> haproxy-dconv</ a > v< b > 0.4.2-15</ b > on < b > 2025/04/08 </ b > </ small >
657
+ < small > Converted with < a href ="https://github.com/cbonte/haproxy-dconv "> haproxy-dconv</ a > v< b > 0.4.2-15</ b > on < b > 2025/04/11 </ b > </ small >
658
658
</ p >
659
659
</ div >
660
660
<!-- /.sidebar -->
665
665
< div class ="text-center ">
666
666
< h1 > < a href ="http://www.haproxy.org/ " title ="HAProxy "> < img src ="../img/HAProxyCommunityEdition_60px.png?0.4.2-15 " /> </ a > </ h1 >
667
667
< h2 > Management Guide</ h2 >
668
- < p > < strong > version 3.2-dev9-46 </ strong > </ p >
668
+ < p > < strong > version 3.2-dev10-29 </ strong > </ p >
669
669
< p >
670
670
< br >
671
671
@@ -4898,6 +4898,11 @@ <h3 id="chapter-9.4.1" data-target="9.4.1"><small><a class="small" href="#9.4.1"
4898
4898
point and a PID. (e.g. @1 or @!1271). A @ alone could be use to specify the
4899
4899
master. Leaving processes are only accessible with the PID as relative process
4900
4900
number are only usable with the current processes.
4901
+
4902
+ This prefix may be used as a wrapper before a command, indicating that this
4903
+ command and only this one will be sent to the designated process. In this
4904
+ case the full command ends at the end of line or semi-colon like any regular
4905
+ command.
4901
4906
</ pre > < div class ="separator ">
4902
4907
< span class ="label label-success "> Examples:</ span >
4903
4908
< pre class ="prettyprint ">
@@ -4916,8 +4921,10 @@ <h3 id="chapter-9.4.1" data-target="9.4.1"><small><a class="small" href="#9.4.1"
4916
4921
$ echo '@!1271 show info; @!1272 show info' | socat /var/run/haproxy-master.sock -
4917
4922
[...]
4918
4923
</ code > </ pre >
4919
- </ div > < pre class ="text "> A prefix could be use as a command, which will send every next commands to
4920
- the specified process.
4924
+ </ div > < pre class ="text "> The prefix may also be use as a standalone command to switch the default execution
4925
+ context to the designated process, indicating that all subsequent commands will all
4926
+ be executed in that process, until a new '@' command changes the execution context
4927
+ again.
4921
4928
</ pre > < div class ="separator ">
4922
4929
< span class ="label label-success "> Examples:</ span >
4923
4930
< pre class ="prettyprint ">
@@ -4934,6 +4941,52 @@ <h3 id="chapter-9.4.1" data-target="9.4.1"><small><a class="small" href="#9.4.1"
4934
4941
$ echo '@1; show info; show stat; @2; show info; show stat' | socat /var/run/haproxy-master.sock -
4935
4942
[...]
4936
4943
</ code > </ pre >
4944
+ </ div > < pre class ="text "> Note about limitations: a few rare commands alter a CLI session's state
4945
+ (e.g. "< a href ="#set%20anon "> set anon</ a > ", "< a href ="#set%20timeout "> set timeout</ a > ") and may not behave exactly similarly once
4946
+ run from the master CLI due to commands being sent one at a time on their own
4947
+ CLI session. Similarly, a few rare commands ("< a href ="#show%20events "> show events</ a > ", "< a href ="#wait "> wait</ a > ") actively
4948
+ monitor the CLI for input or closure and are immediately interrupted when the
4949
+ CLI is closed. These commands will not work as expected through the master
4950
+ CLI because the command's input is closed after each command. For such rare
4951
+ casesn the "@@" variant below might be more suited.
4952
+
4953
+ @@<[!]pid> [command...]
4954
+ This prefix or command is very similar to the "@" prefix documented above
4955
+ except that it enters the worker process, delivers the whole command line
4956
+ into it as-is and stays there until the command finishes. Semi-colons are
4957
+ delivered as well, allowing to execute a full pipelined command in a worker
4958
+ process. The connection with the work remains open until the list of commands
4959
+ completes. Any data sent after the commands will be forwarded to the worker
4960
+ process' CLI and may be consumed by the commands being executed and will be
4961
+ lost for the master process' CLI, offering a truly bidirectional connection
4962
+ with the worker process. As such, users of such commands must be very careful
4963
+ to wait for the command's completion before sending new commands to the
4964
+ master CLI.
4965
+
4966
+ Instead of executing a single command, it is also possible to open a fully
4967
+ interactive session on the worker process by not specifying any command
4968
+ (i.e. "@@1" on its own line). This session can be terminated either by
4969
+ closing the connection or by quitting the worker process (using the "< a href ="#quit "> quit</ a > "
4970
+ command).
4971
+ </ pre > < div class ="separator ">
4972
+ < span class ="label label-success "> Examples:</ span >
4973
+ < pre class ="prettyprint ">
4974
+ < code > < span class ="comment "> # gracefully close connections and delete a server once idle (wait max 10s)</ span >
4975
+ $ socat -t 11 /var/run/haproxy-master.sock - <<< \
4976
+ "@@1 disable server app2/srv36; \
4977
+ wait 10000 srv-removable app2/srv36; \
4978
+ del server app2/srv36"
4979
+
4980
+ < span class ="comment "> # forcefully close connections and quickly delete a server</ span >
4981
+ $ socat /var/run/haproxy-master.sock - <<< \
4982
+ "@@1 disable server app2/srv36; \
4983
+ shutdown sessions server app2/srv36; \
4984
+ wait 100 srv-removable app2/srv36; \
4985
+ del server app2/srv36"
4986
+
4987
+ < span class ="comment "> # show messages arriving to this ring in real time ("tail -f" equivalent)</ span >
4988
+ $ (echo "show events buf0 -w"; read) | socat /var/run/haproxy-master.sock -
4989
+ </ code > </ pre >
4937
4990
</ div > < a class ="anchor " name ="expert-mode "> </ a > < a class ="anchor " name ="9-expert-mode "> </ a > < a class ="anchor " name ="9.4.1-expert-mode "> </ a > < a class ="anchor " name ="expert-mode (Statistics and monitoring) "> </ a > < a class ="anchor " name ="expert-mode (Master CLI commands) "> </ a > < div class ="keyword "> < b > < a class ="anchor " name ="expert-mode "> </ a > < a href ="#9.4.1-expert-mode "> expert-mode</ a > </ b > < span style ="color: #008 "> [on|off]</ span > </ div > < pre class ="text "> This command activates the "< span class ="dropdown "> < a class ="dropdown-toggle " data-toggle ="dropdown " href ="# "> expert-mode< span class ="caret "> </ span > </ a > < ul class ="dropdown-menu "> < li class ="dropdown-header "> This keyword is available in sections :</ li > < li > < a href ="#expert-mode%20%28Unix%20Socket%20commands%29 "> Unix Socket commands</ a > </ li > < li > < a href ="#expert-mode%20%28Master%20CLI%20commands%29 "> Master CLI commands</ a > </ li > </ ul > </ span > " for every worker accessed from the
4938
4991
master CLI. Combined with "< a href ="#mcli-debug-mode "> mcli-debug-mode</ a > " it also activates the command on
4939
4992
the master. Display the flag "e" in the master CLI prompt.
@@ -5473,7 +5526,7 @@ <h2 id="chapter-13.1" data-target="13.1"><small><a class="small" href="#13.1">13
5473
5526
< br >
5474
5527
< hr >
5475
5528
< div class ="text-right ">
5476
- HAProxy 3.2-dev9-46 – Management Guide< br >
5529
+ HAProxy 3.2-dev10-29 – Management Guide< br >
5477
5530
< small > , </ small >
5478
5531
</ div >
5479
5532
</ div >
0 commit comments