Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-25-2005, 02:17 AM   #1
Registered: Aug 2005
Distribution: Debian, Ubuntu, Fedora
Posts: 74

Rep: Reputation: 15
does ifconfig rx bytes counter have Max limit


I have made a PHP script that runs periodically and get the value of RX bytes and TX bytes from the output of `ifconfig eht0` command, then it subtract the current RX or TX bytes value from the previous RX or TX value and divide it by the nomber of seconds betwen the tow samples to get (Bytes/Sec) ratio.

I am using it from inside cacti on a running server which have 4 to 6 GB transfer per day.

I have noticed that I have got a negative result of the ratio, yesterday the TX bytes output was something like 2 GB and today it is 3 MB !.

so the counter flip to zero and continue counting when it reaches an upper limit.

I need to know what Max limit it has? is it 2 to the power of 32 as it is a 32bit counter. I want the excact number so I can fix my script and get acurate values.

Old 12-26-2005, 04:03 PM   #2
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
Ive seen values as high as 4G someties, but not much larger than that.. There is a limit, tho I dont know what it exactly is.. 2^32 would seem to be around that neighbourhood, so thats prolly it. (2^32 / 1024 / 1024 = 4096)
Old 12-26-2005, 05:07 PM   #3
Registered: Aug 2005
Distribution: Debian, Ubuntu, Fedora
Posts: 74

Original Poster
Rep: Reputation: 15
thanks , I have made the script to handle the value of 2^32-1 as the max limit.

it is working ok now.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
APACHE: limit max connections from the same IP ? tclwp Linux - Networking 3 06-24-2005 11:47 AM
Threads - Max Limit socratesinus Linux - Software 5 04-20-2005 03:43 PM
ifconfig counter question masterJ Linux - General 4 10-15-2003 09:53 AM
max process limit anoop_chandran Linux - Networking 2 01-16-2002 05:22 AM
Counting bytes with ifconfig FredrikN Linux - Networking 2 12-17-2001 12:52 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration