darold / squidanalyzer

Squid Analyzer parses Squid proxy access log and reports general statistics about hits, bytes, users, networks, top URLs, and top second level domains. Statistic reports are oriented toward user and bandwidth control.
http://squidanalyzer.darold.net/
125 stars 36 forks source link

Total Throughput seems too low #195

Closed Schokobecher closed 5 years ago

Schokobecher commented 5 years ago

Hello, I've been using SquidAnalazyer for a while now and noticed something strange on my setup. Total Throughput is always very low when I choose BYTES as TransferUnit it always hovers around ~1,300 B/s on the daily view (last complete day)

The number doesn't really add up with the Total Bytes sitting at 2,029,081,246, setting TransferUnit to MB makes it 0,00 all the time. Not running a high load at the moment, but if I select single users, they already have a higher Throughput (One, for example, has 4,673 B/s) when viewing them directly.

Am I reading this statistic wrong or what going on? Essentially I'm trying to read the average bandwidth consumption per selected period.

Cheers, Pierre

darold commented 5 years ago

Hi,

Throughput is the sum of bytes downloaded divided by the sum of elapsed time in seconds to download the files in the time period reported. For example if you have 10GB of data download in a day with accumulated elapsed time of 1 hour, the throughput will be (10737418240÷3600) = 2982616 B/s.

In squid logformat directive, elapsed time is the second field (%6tr). The download size is the fifth field (%<st).