darfy n00b
Joined: 21 Jun 2004 Posts: 4
|
Posted: Mon Jul 12, 2004 9:16 am Post subject: Gentoo Linux & int max size |
|
|
Hello all,
I use on my server (Sparc Ultra 5) "bwbar", a small tool that generate a utilization bar from an interface. Example :
http://www.kernel.org/ubar/ubar.png
It works great for a certain time, but then it stops working properly. It reports always 0.00.
I tried to analyse the code of this program. It uses /proc/net/dev to read the values at regular interval.
But when it reads this values, it uses "unsigned int". I tried to put "long unsigned int" and it seems to works a little more but it fails after a while.
Now, with "long unsigned int", il always read "4294967295" (the max capacity of long unsigned int on Sparc I suppose). The value it should have read is currently 6590193760.
Do you confirm what I suppose ? Do you have an idea on how I can make this thing works ? |
|