LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: About traffic monitoring

To: "lvs-users@xxxxxxxxxxxxxxxxxxxxxx" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: About traffic monitoring
From: Wang Haiguang <wanghaig@xxxxxxxxxxxxxxx>
Date: Thu, 22 Mar 2001 17:54:29 +0800 (GMT-8)
Two methods. Maybe not so good.

1. Tcpdump

One is using the Tcpdump to capture the workload to the realservers. For
this method, I think you need to write a small program to analyze the
trace. One problem about this problem is that when workload is very high
at the dispatcher, tcpdump begin to lost packets.

2. Kernel programming

The other is add a counter in the destion table in include/net/ip_vs.h,
the structure is named 'destination'. and increase it when you receive a
request from out side. This can be done in file net/ipv4/ip_vs.c, the 
function name is ip_vs_schedule(), in this function, there are codes
select server from the list and the selected server is returned. It is
a pointer of 'destination' type, the variable name is 'dest'. You can
increase the counter here.

The output of the information can be done in the
ip_vs_bind_scheduler(); when you
want to read the result, call the 'ipvsadm -E ....' then you can have the
result.

The code should not more than 50 lines.

After these have been done, recompile the kernel. After install the 

new kernel then you can enjoy your results.

Good lucky.

Comments are welcome to my method.




Wang Hiaguang




On Thu, 22 Mar 2001, hotman wrote:

> Hi, every body,
> 
> How are you?
> 
> I want to know the each rate of  traffic  sent to realserver by
> director.
> How can I get them?
> 
> If you have any idea for this, please let me know.
> Thank you.
> 
> Best regards.
> Zhao.
> 
> 
> 
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
> or go to http://www.in-addr.de/mailman/listinfo/lvs-users
> 



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