nload average function files with high bitrates
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nload (Ubuntu) |
Confirmed
|
Wishlist
|
Daniel T Chen |
Bug Description
Seen on Feisty, but also exists in Dapper:
edb@lapedb:
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Description
+++-===
ii nload 0.6.0-3 A realtime console network usage monitor
When you start nload the 'normal' way it will provide you with an average value. This value is calculated based on a window, the user can set the window using the -s flag followed by a value between 1 and 9 inclusive, when not passed 9 will be used. This smoothvalue * 45 is the number of values that will be stored. As soon as the bandwidth exceeds a certain value (problem doesn't occur with 60 mbit, but occurs with 90 mbit after approx three minutes) the calculated sum of transferred data will overflow the 32 bit digit which is stored withing it and you will need to restart nload to get a new reading. (or you should specify using the -s flag from the beginning).
The error lies in the file status.cpp in the function unsigned long Status:
Changed in nload: | |
assignee: | nobody → crimsun |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
Attached it status.cpp.diff which contains a fix for the calcAverage() function, busicly instead of enumerating all the items in the window, it simply starts accumulating numbers and it stops when either the entire window is calculated or when the sum would overflow.