Closed hos7ein closed 7 years ago
Hi,
You can use scur metric like this:
haproxytool server -D <dir_path> -m scur <server>
From HAproxy documentation:
tnx @unixsurfer
when i use of nbproc in haproxy , better use of one single socket file for all cpu cores ? or use of separate files for each cpu core?
You need to bind each HAProxy process to a different UNIX stats socket, and then use -D argument to point to the directory with all UNIX stats socket files.
@hos7ein , may I close this ticket?
@unixsurfer oh yeah, Thank you.
@unixsurfer hi again
I bind each HAProxy process to a different UNIX stats socket, and then use -D argument to point to the directory with all UNIX stats socket files.But when run this command :
haproxytool server -D /var/lib/haproxy -m scur nginx-b-dev
It does not display anything! below is output :
https://paste.fedoraproject.org/paste/-JSp~WjY4F5hJdLtLcXyvF5M1UNdIGYhyRLivL9gydE=
But when I run this command it's working :
https://paste.fedoraproject.org/paste/PXBpnxFW31G-T2nDocNn2F5M1UNdIGYhyRLivL9gydE=
Is something wrong?
tnx
Hi @hos7ein,
In the first case you gave the server name and you got back the current sessions only of that server. In the second case you didn't pass a server name and therefore the tool return the requests served by all servers.
So, the tool worked as expected.
Could you please read the help of server ( haproxytool server --help) command and let me know which part isn't clear to you?
Cheers, Pavlos
tnx @unixsurfer for response
Imaging “nginx-b-dev” is server name in “nginx-dev” backend. How can I see real time request on “nginx-b-dev” server?
Thank you
you can do it with: haproxytool server -r --backend=nginx-dev nginx-b-dev
Please read the help message from information.
hi
how can i show(monitor) current connection or Session per server?
tnx