Created
July 6, 2020 14:08
-
-
Save haproxytechblog/89bdb33597f7b1115ad50f8446cb7803 to your computer and use it in GitHub Desktop.
Get to Know the HAProxy Process Manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo systemctl status haproxy | |
Main PID: 7528 (haproxy) | |
Tasks: 3 (limit: 1152) | |
CGroup: /system.slice/haproxy.service | |
├─7528 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -S /run/haproxy-master.sock | |
└─7529 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -S /run/haproxy-master.sock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program dataplaneapi | |
command /usr/local/bin/dataplaneapi --host 0.0.0.0 --port 5555 --haproxy-bin /usr/sbin/haproxy --config-file /etc/haproxy/haproxy.cfg --reload-cmd "systemctl reload haproxy" --reload-delay 5 --userlist haproxy-dataplaneapi | |
no option start-on-reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program mirror | |
command spoa-mirror --runtime 0 --mirror-url http://test.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-S /run/haproxy-master.sock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo 'help' | sudo socat /run/haproxy-master.sock - | |
help : this message | |
prompt : toggle interactive mode with prompt | |
quit : disconnect | |
show cli sockets : dump list of cli sockets | |
show cli level : display the level of the current CLI session | |
operator : lower the level of the current CLI session to operator | |
user : lower the level of the current CLI session to user | |
@<relative pid> : send a command to the <relative pid> process | |
@!<pid> : send a command to the <pid> process | |
@master : send a command to the master process | |
show proc : show processes status | |
reload : reload haproxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo 'show proc' | sudo socat /run/haproxy-master.sock - | |
#<PID> <type> <relative PID> <reloads> <uptime> <version> | |
9730 master 0 0 0d00h00m19s 2.1.4-1ppa1~bionic | |
# workers | |
9732 worker 1 0 0d00h00m19s 2.1.4-1ppa1~bionic | |
# programs | |
9731 dataplaneapi - 0 0d00h00m19s - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo '@1 show info' | sudo socat /run/haproxy-master.sock - | |
Name: HAProxy | |
Version: 2.1.4-1ppa1~bionic | |
Release_date: 2020/04/12 | |
Nbthread: 2 | |
Nbproc: 1 | |
Process_num: 1 | |
Pid: 9732 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment