mum4k / tc_reader

A persistent SNMP script that exports TC Queue and Class statistics for graphing (for example to Cacti).
10 stars 4 forks source link

value out of range #5

Closed Roxyrob closed 6 years ago

Roxyrob commented 6 years ago

We get "value out of range", probably "... bytes 2288850176..." is not correctly managed by tc_reader in an example like this:

qdisc htb 1: root refcnt 5 r2q 30 default 999 direct_packets_stat 18 Sent 4791659924498 bytes 2288850176 pkt (dropped 55735, overlimits 2573220655 requeues 1040) backlog 58691b 46p requeues 1040

Debug message on /var/log/messages

start(): Starting the tc_reader. tc_reader[27253]: tc_reader configuration: tcCmdPath: /sbin/tc parseInterval: 5 tcQdiscStats: [-s qdisc show dev] tcClassStats: [-s class show dev] ifaces: [ifc1 ifc2 ifc3] userNameClass: map[] tc_reader[27253]: parseTc(): Unable to parse the output of TC commands while getting Qdisc statistics, error: strconv.ParseInt: parsing "2288850176": value out of range tc_reader[27253]: Listen(): received a PING. tc_reader[27253]: Listen(): processing SNMP GET-NEXT for oid .1.3.6.1.4.1.2021.255 ... tc_reader[27253]: Listen(): received an empty line from the SNMP daemon, exiting ...

mum4k commented 6 years ago

Hi Roxyrob,

thanks a lot for the bug report. I will go ahead and try to reproduce this locally.

Jakub

Roxyrob commented 6 years ago

I mum4k, thank you for your work ! Can you add "Packet Requeues" to tc_reader and in tc_queues_classes.xml ?

mum4k commented 6 years ago

Hi Roxyrob,

I have managed to reproduce this locally (the problem with large values) and will send a fix shortly.

As for the "Packet Requeues" support - can you please open a separate issue to discuss this?

Roxyrob commented 6 years ago

Ok. thank you !