LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: how to get active or inactive connections number

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: how to get active or inactive connections number
From: Jeremy Kerr <jeremy@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 Feb 2003 12:41:38 +0800
>      I want to get the active and inactive connections of one virtual
> service in my program. Is there any tool or interface helpful to me?
>      It is my first time to post here    and thank everyone in advance!

You have two options here:

1) Read the /proc/net/ip_vs file, and parse it for the required numbers; or
2) Use libipvs (distributed with ipvsadm) to read the tables directly. Take a 
look in ipvsadm.c for how this is done. 


Jeremy


<Prev in Thread] Current Thread [Next in Thread>