LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
 
Search this Thread
Old 04-20-2013, 03:24 AM   #1
waddles
Member
 
Registered: Sep 2012
Posts: 372

Rep: Reputation: 1
Need explanation of /proc/net/dev bytes counters


Would like to know the exact working of /proc/net/dev under Slackware 13.37?
As I perceive the "bytes" columns that at some undefined point in time they get the number of bytes transmitted and bytes received. I have not been able to find when that time is and need to know. Also I see that it must not be reset to zero as when there is NO activity the byte values go unchanged. Do I have that correct? Are these aggregation values? If they are as they seem, are they ever reset to lower values and under what conditions?
Thanks for the help in advance
 
Old 04-20-2013, 04:17 AM   #2
273
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 3,966

Rep: Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905
The "bytes" column for "Receive" and "Transmit" are the number of bytes received and sent since the machine was last booted up -- in other words in the period given by "uptime".
At least that is what they represent on my machine at present.
 
Old 04-20-2013, 04:34 AM   #3
waddles
Member
 
Registered: Sep 2012
Posts: 372

Original Poster
Rep: Reputation: 1
That may be but it doesn't explain why when I monitor ppp0 the numbers go up (haven't seen them go down) which makes me want to agree but when I look at it later (after dropping the link) I see low byte counts for lo interface than had been there.
I also just looked at is -p link and ifconfig which showed different values albeit i did not bring up the web link. Still in a quandery?

Last edited by waddles; 04-20-2013 at 04:35 AM.
 
Old 04-20-2013, 04:41 AM   #4
273
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 3,966

Rep: Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905
I'm not sure I understand. Isn't lo the local loopback device so I would expect only a low byte count if any depending on what you're running? Are you saying ppp0 goes down also?
I'm using a wireless card wlan0 and the numbers I get for both match perfectly.
I've not used ppp connections so perhaps they're dealt with differently?
 
Old 04-20-2013, 05:23 PM   #5
waddles
Member
 
Registered: Sep 2012
Posts: 372

Original Poster
Rep: Reputation: 1
When I mentioned the lo byte counts, I was flagging the point that when there was no activity there that byte counts never went to zero. I expected that if there was no activity for a period that that would be so reflected but I guess not.
I am beginning to think that the byte counts are reflective of current activity not since bootup otherwise the byte count I see from different sessions using the browser would increase astronomically and that does not seem to happen.
Hence, I have gathered the there must 1st be a transmission or upload count then a download count until the next upload, i.e. request data, receive data, and repeat. Would you all agree with that?
 
Old 04-20-2013, 05:32 PM   #6
273
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 3,966

Rep: Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905
I'm not sure what you mean. The count never goes down at is it cumulative.
The counts are the number of bytes transmitted and the number of bytes received received on that interface since the interface was brought up.
So:
The count will never go down because you cannot un-transmit or un-receive bytes without going back in time.
The count will go up, and stay up, every time a byte is received or transmitted, respectively.
The count will be reset to zero when you reboot.
 
Old 04-21-2013, 01:20 AM   #7
waddles
Member
 
Registered: Sep 2012
Posts: 372

Original Poster
Rep: Reputation: 1
I totally agree with UR last statement. Although it probably doesn't read like it but that is what I was saying while trying not to be direct as I was having difficulty finding documents stating it directly. Will mark this solved.
 
  


Reply


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
Certain multicast address not updating the /proc/net/dev counters Rajesh.CB Linux - Networking 1 12-03-2012 08:15 AM
Need of explanation for /proc/net/sockstat file geddysekar Linux - Kernel 1 06-21-2011 11:15 AM
/proc/net/dev packet counters question shibeaux Linux - Networking 6 08-25-2010 02:23 PM
/proc/net/dev format vlyamtse Linux - General 1 06-08-2007 10:34 AM
/proc/dev/net and /proc/net/dev problem ! Linux.tar.gz Slackware 1 05-23-2007 05:24 AM


All times are GMT -5. The time now is 10:28 PM.

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