[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#687812: vnstat --live: min > avg



Package: vnstat
Version: 1.11-1
Severity: normal

Here is a sample output of vnstat --live.

|                            rx         |       tx
| --------------------------------------+------------------
|   bytes                     1.97 MiB  |        2.05 MiB
| --------------------------------------+------------------
|           max           126.50 KiB/s  |     88.00 KiB/s
|       average            80.72 KiB/s  |     84.00 KiB/s
|           min            38.50 KiB/s  |     87.00 KiB/s
| --------------------------------------+------------------
|   packets                       2454  |            2401
| --------------------------------------+------------------
|           max                123 p/s  |         125 p/s
|       average                 98 p/s  |          96 p/s
|           min                 84 p/s  |          81 p/s
| --------------------------------------+------------------
|   time                    25 seconds
 
Notice that it lists average tx as 84 KiB and min tx as 87 KiB. From a
mathematical point of view this sounds wrong. This behaviour occurs
"sometimes". I cannot tell a reliable way to reproduce. Obviously you
need very constant traffic to exhibit this behaviour. A possible cause
may be the use of integer arithmetics when computing the timespent.
There is room for one second error there and indeed 84 / 25 * 26 > 87.

Helmut


Reply to: