LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] Weird values for lvsServiceStatsInBytes

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] Weird values for lvsServiceStatsInBytes
From: "Malcolm Turnbull" <malcolm@xxxxxxxxxxxxxxxx>
Date: Thu, 2 Oct 2008 18:28:10 +0100
Laurentiu / Jack,

I've noticed the same problem as well a while back:

The output I got was:

LVS-MIB::lvsRealServerAddr.1.1 = IpAddress: 192.168.2.9
LVS-MIB::lvsRealServerPort.1.1 = INTEGER: 80
LVS-MIB::lvsRealServerFlags.1.1 = INTEGER: 387
LVS-MIB::lvsRealServerWeight.1.1 = INTEGER: 1
LVS-MIB::lvsRealStatsConns.1.1 = Counter32: 469
LVS-MIB::lvsRealStatsInPkts.1.1 = Counter32: 28782
LVS-MIB::lvsRealStatsOutPkts.1.1 = Counter32: 0
LVS-MIB::lvsRealStatsInBytes.1.1 = Counter64: 19232047507701760
LVS-MIB::lvsRealStatsOutBytes.1.1 = Counter64: 0

Alex Davies then explained it to me as  (NB. Must have given him a
different example).:
--snip--
To explain in English, lets use two of the silly numbers given in your email:

A: 6103148527616
B: 19426137079808

Convert these to binary (in your head if you are super-cool, otherwise
I use http://faculty.plattsburgh.edu/albert.cordes/DECBIN.HTML )

A: 1011000110100000000000000000000000000000000
B: 100011010101100000000000000000000000000000000

Now, we can note that there are 32 (or more) zeros at the end of these
numbers. In fact, any number that it throws out will have 32 bits of
zeros after it. I havent tried to get LVS to return a number over 18.4
quintillion in, but I guess that it would either move to a counter128
and pad it with 64 zeros (or 96, or 32 - who knows?) or it would just
work. In any case, I don't think that it is likely that this is a
number we will ever have to deal with...

So, if I remove the 32 zeros far right from numbers A and B above
("shift it right 32 bits"), I get

A: 10110001101
B: 1000110101011

Converting these back to decimal:

A: 1421
B: 4523

These are the correct values.
--snip--

But we never got as far as fixing it in the code, if anyone knows how
I'd be happy to sponsor them to do it.








2008/10/2 Laurentiu C. Badea (L.C.) <lc@xxxxxxxx>:
>

>
> I think you might be usign the wrong value, the rates are
> lvsServiceRateInBPS and lvsServiceRateOutBPS. The ones you mentioned are
> counters.

-- 
Regards,

Malcolm Turnbull.

Loadbalancer.org Ltd.
Phone: +44 (0)870 443 8779
http://www.loadbalancer.org/


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