mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
DOC: management: rework the Master CLI section
Rework the master CLI section the same way the "Unix Socket commands" section is made, ordering the available keywords in the section.
This commit is contained in:
parent
2454d6ef5b
commit
af140ab2f5
@ -31,6 +31,7 @@ Summary
|
|||||||
9.2. Typed output format
|
9.2. Typed output format
|
||||||
9.3. Unix Socket commands
|
9.3. Unix Socket commands
|
||||||
9.4. Master CLI
|
9.4. Master CLI
|
||||||
|
9.4.1. Master CLI commands
|
||||||
10. Tricks for easier configuration management
|
10. Tricks for easier configuration management
|
||||||
11. Well-known traps to avoid
|
11. Well-known traps to avoid
|
||||||
12. Debugging and performance issues
|
12. Debugging and performance issues
|
||||||
@ -3623,34 +3624,11 @@ Example:
|
|||||||
# haproxy -Ws -S /tmp/master-socket,uid,1000,gid,1000,mode,600 -f test1.cfg
|
# haproxy -Ws -S /tmp/master-socket,uid,1000,gid,1000,mode,600 -f test1.cfg
|
||||||
# haproxy -W -S /tmp/master-socket,level,user -f test1.cfg
|
# haproxy -W -S /tmp/master-socket,level,user -f test1.cfg
|
||||||
|
|
||||||
The master CLI introduces a 'show proc' command to surpervise the
|
|
||||||
processes:
|
|
||||||
|
|
||||||
Example:
|
9.4.1 Master CLI commands
|
||||||
|
--------------------------
|
||||||
$ echo 'show proc' | socat /var/run/haproxy-master.sock -
|
|
||||||
#<PID> <type> <reloads> <uptime> <version>
|
|
||||||
1162 master 5 [failed: 0] 0d00h02m07s 2.5-dev13
|
|
||||||
# workers
|
|
||||||
1271 worker 1 0d00h00m00s 2.5-dev13
|
|
||||||
# old workers
|
|
||||||
1233 worker 3 0d00h00m43s 2.0-dev3-6019f6-289
|
|
||||||
# programs
|
|
||||||
1244 foo 0 0d00h00m00s -
|
|
||||||
1255 bar 0 0d00h00m00s -
|
|
||||||
|
|
||||||
|
|
||||||
In this example, the master has been reloaded 5 times but one of the old
|
|
||||||
worker is still running and survived 3 reloads. You could access the CLI of
|
|
||||||
this worker to understand what's going on.
|
|
||||||
|
|
||||||
When the prompt is enabled (via the "prompt" command), the context the CLI is
|
|
||||||
working on is displayed in the prompt. The master is identified by the "master"
|
|
||||||
string, and other processes are identified with their PID. In case the last
|
|
||||||
reload failed, the master prompt will be changed to "master[ReloadFailed]>" so
|
|
||||||
that it becomes visible that the process is still running on the previous
|
|
||||||
configuration and that the new configuration is not operational.
|
|
||||||
|
|
||||||
|
@<[!]pid>
|
||||||
The master CLI uses a special prefix notation to access the multiple
|
The master CLI uses a special prefix notation to access the multiple
|
||||||
processes. This notation is easily identifiable as it begins by a @.
|
processes. This notation is easily identifiable as it begins by a @.
|
||||||
|
|
||||||
@ -3694,6 +3672,15 @@ Examples:
|
|||||||
$ echo '@1; show info; show stat; @2; show info; show stat' | socat /var/run/haproxy-master.sock -
|
$ echo '@1; show info; show stat; @2; show info; show stat' | socat /var/run/haproxy-master.sock -
|
||||||
[...]
|
[...]
|
||||||
|
|
||||||
|
prompt
|
||||||
|
When the prompt is enabled (via the "prompt" command), the context the CLI is
|
||||||
|
working on is displayed in the prompt. The master is identified by the "master"
|
||||||
|
string, and other processes are identified with their PID. In case the last
|
||||||
|
reload failed, the master prompt will be changed to "master[ReloadFailed]>" so
|
||||||
|
that it becomes visible that the process is still running on the previous
|
||||||
|
configuration and that the new configuration is not operational.
|
||||||
|
|
||||||
|
reload
|
||||||
You can also reload the HAProxy master process with the "reload" command which
|
You can also reload the HAProxy master process with the "reload" command which
|
||||||
does the same as a `kill -USR2` on the master process, provided that the user
|
does the same as a `kill -USR2` on the master process, provided that the user
|
||||||
has at least "operator" or "admin" privileges.
|
has at least "operator" or "admin" privileges.
|
||||||
@ -3704,6 +3691,26 @@ Example:
|
|||||||
|
|
||||||
Note that a reload will close the connection to the master CLI.
|
Note that a reload will close the connection to the master CLI.
|
||||||
|
|
||||||
|
show proc
|
||||||
|
The master CLI introduces a 'show proc' command to surpervise the
|
||||||
|
processe.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
$ echo 'show proc' | socat /var/run/haproxy-master.sock -
|
||||||
|
#<PID> <type> <reloads> <uptime> <version>
|
||||||
|
1162 master 5 [failed: 0] 0d00h02m07s 2.5-dev13
|
||||||
|
# workers
|
||||||
|
1271 worker 1 0d00h00m00s 2.5-dev13
|
||||||
|
# old workers
|
||||||
|
1233 worker 3 0d00h00m43s 2.0-dev3-6019f6-289
|
||||||
|
# programs
|
||||||
|
1244 foo 0 0d00h00m00s -
|
||||||
|
1255 bar 0 0d00h00m00s -
|
||||||
|
|
||||||
|
In this example, the master has been reloaded 5 times but one of the old
|
||||||
|
worker is still running and survived 3 reloads. You could access the CLI of
|
||||||
|
this worker to understand what's going on.
|
||||||
|
|
||||||
10. Tricks for easier configuration management
|
10. Tricks for easier configuration management
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user