LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Graphing connections with RRDTool

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Graphing connections with RRDTool
From: "Salvatore D. Tepedino" <sal@xxxxxxxxxxxx>
Date: Tue, 18 Nov 2003 23:08:10 -0500
On Tue, 2003-11-18 at 20:31, Horms wrote:
> On Tue, Nov 18, 2003 at 02:10:09PM -0500, Salvatore D. Tepedino wrote:
> > On Tue, 2003-11-18 at 03:22, Horms wrote:
> > Well, this was my first try (not libipvs, but querying /proc/net), but
> > what I can apparently get from the kernel is the same output of ipvsadm
> > (/proc/net/ip_vs), but the IPs and Port are in hex, which would not be
> > too hard to convert, but it's an extra unnecessary step. 
> 
> Uneccessary? The LVS kernel code always returns values in hex.
> So they have to be converted somewhere along the line.
> Weather by ipvsadm, libipvs or something else.

Well, I mean in terms of getting the script to work. I'd have to convert
the IP to dotted quad... Hmm... actually, I only use the last octet and
the port... Well... In any case, ipvsadm provides the information and
does it quick enough that it's not really an issue, as I only do one
query in the script, then parse the output. If it becomes an issue or I
become motivated to change it (entirely likely) then that's how I'll do
it. In the meantime, I plan to modify the script so the VIP and service
can be specified on the command line for the graphing script. As it is
now, it just mashes everything together into one graph, which for my
purposes is fine, but for others may not be.

> > Or I could
> > parse the output of /proc/net/ip_conntrack, but that would be alot more
> > work, and since I'm working in bash, it's likely that ipvsadm is faster.
> > I'll have to look into libipvs and see if it'll help, although I've not
> > ventured into C programming since college... Would be interesting.
> 
> libipvs should make life easier. But if you want to work in
> something other than C it might be easier to access /proc directly
> if the information you need is there.

You're right. It is, and I likely will. That's how I get the information
for cpu usage, memory, swap, load, etc. I just wanted to skip the hex
conversion step as when I initially wrote the script I didn't know how
to do it, although I found out during the course of writing it, which
was half of the reason for doing it ;)

-- 
Salvatore D. Tepedino <sal@xxxxxxxxxxxx>

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