Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo Linux & int max size
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message
darfy
n00b
n00b


Joined: 21 Jun 2004
Posts: 4

PostPosted: Mon Jul 12, 2004 9:16 am    Post subject: Gentoo Linux & int max size Reply with quote

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 ?
Back to top
View user's profile Send private message
darfy
n00b
n00b


Joined: 21 Jun 2004
Posts: 4

PostPosted: Mon Jul 12, 2004 9:50 am    Post subject: Reply with quote

I now use "unsigned long long int" and it works longuer... I'm hoping that it will works long enough...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum