LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   ifconfig counter question (https://www.linuxquestions.org/questions/linux-general-1/ifconfig-counter-question-104162/)

masterJ 10-15-2003 06:00 AM

ifconfig counter question
 
Just a quick question about ifconfig...

ifconfig displays counters for total bytes sent and recieved by each interface, but this appears to reset to zero after a set number of bytes or a set amount of time.

Anyone out there know what these values are, and whether there's a way of finding the true stats for the duration that the interface has been up??

Thanks guys...

dkloes 10-15-2003 08:57 AM

netstat -i also displays stats but not sure about the resetting to 0 problem or if netstat does the same thing

masterJ 10-15-2003 09:23 AM

netstat -i gives the packet count of each device rather than the byte count.

Found from a little investigation that these stats all come from /proc/net/dev so I guess this is the file that's having it's stats zero'd occasionally... So any idea how to stop it, or is that just something I'm gonna have to put up with?

Thanks...

dkloes 10-15-2003 09:41 AM

Also doing some research ...

Have you considered ethereal?

masterJ 10-15-2003 09:53 AM

Not really thought about it - was more thinking of stats that can just be grabbed straight from the kernel...


All times are GMT -5. The time now is 09:38 AM.