Hello,

Am 01.09.2017 um 15:46 schrieb Mariusz Gronczewski:
> Hi,
>
> I've been working on a piece of code to announce IPs (via ExaBGP) only if:
>
> * HAProxy is running
> * HAProxy actually uses a given IP
> * a frontend with given IP is up for few seconds.
>
> I could do that via lsof but that's pretty processor-intensive. 

Not sure about the stats or admin socket, but why not use ss instead?

Something like:
sudo ss -tlnĀ  '( sport = :80 or sport = :443 )'

add "-p" if you need the PID.

Should perform well enough.



Regards,
Lukas


Reply via email to