[squid-users] Bug in the squid snmp

Amos Jeffries squid3 at treenet.co.nz
Sun Sep 6 11:34:18 UTC 2015


On 6/09/2015 8:20 p.m., FredT wrote:
> Hi Amos,
> 
> So what ?
> I noticed it's a  32 bit integer <https://en.wikipedia.org/wiki/32-bit>  
> with a "4,294,967,295" limit in unsigned but it cannot be an excuse to
> provide a wrong number...
> The squidclient displays the right value but as the same value from the snmp
> is an unsigned so here it's allowed to truncate the value ? does not make
> sense...

The mgr report is not limited to 32-bit gauge semantics. So its showing
the true underlying value.

> 
> What's the right way: respect the unsigned int limit or display the right
> value ?
> From my side I suppose the right way is to display the right value, so I
> think you should fix the snmp with the right types to provide the reality 
> 
> Does it make sense for you too ?
> 

That is the right value for a 32-bit gauge AFAICT.

The way gauges work is analogous to open-topped vessel such as a cup.
You can pour part-cups into it, or you can pour a whole lake into it. At
the end it will still only show up to 1 cup worth, because that is its
capacity limit everything else overflows and is gone.

The numbers you are trying to get out of Squid are "off the scale".


None of us current dev understand SNMP well enough to provide an
alternative 64-bit gauge. We do know that OID must never ever change
their types or meaning. Which is why you see the version indicators in
the FAQ table. Once somene comes along who knows SNMP properly and can
define correct OID binary type values for 64-bit we will probably have
to add whole new OID for those anywany and leave this one showing what
you see now.

Amos



More information about the squid-users mailing list