SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Anyone know anything about ifconfig and why it resets the downloaded data and uploaded data after about 3 gigs or so? I'd like to keep a running total but I don't know if ifconfig can do that. I'd e-mail the developer but I don't know an e-mail for them... Let me know what you think.
Is this something that is somehow patchable or is there a fix out for it? Not that it would help, but would contacting the developers help in this issue? I'm just looking to get an accurate count of how much I've downloaded/uploaded just using ifconfig.
I'm not sure if there was a fix for it or not. I can't seem to find what the actual problem is, although I believe it is due to them using the wrong type of variable or something like that. I have seen it mentioned in a couple of documents, but I have forgotten where.
There is some talk about it not being very accurate as well. I have not tested this.
I think the numbers you are talking about are really a kernel issue. The ifconfig program stats are simply reporting the contents of /proc/net/dev from the kernel. Try the following command:
cat /proc/net/dev
The text reported is the same values that ifconfig reports but in a raw data form. Fairly difficult to read.
The kernel is probably using a double for the data type at present, in order to even show a 3 GByte number. But whatever data type is chosen, it would rollover at some point anyway. All data types have a min and max value.
As for error margin, I would think the byte count is accurate. However, the packet count is difficult to use because a packet can vary in size. I think the max packet size is something like 1500 bytes and the min is 64 bytes or close to that range.
I see the output is rather nasty... so is it worth it to persue a fix for this to keep a running total? or should I just forget about it all together. RIght now I'm not even sure what ifconfig is packaged with, though I havn't looked much.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.