Discussion:
[BusyBox] ifconfig: ifconfig <dev> and RX/TX bytes issues
Giulio Orsero
2003-07-19 13:32:51 UTC
Permalink
linux-2.0.33/libc5/gcc version 2.7.2.3, latest busybox cvs

RX and TX bytes to 0 even if packets are > 0

$ ./busybox ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:50:04:36:80:2B
inet addr:192.168.1.117 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32230 errors:0 dropped:0 overruns:0 frame:0
TX packets:16662 errors:0 dropped:0 overruns:0 carrier:0
collisions:41
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:5 Base address:0x250

============================================
linux-2.2.16/glibc-2.1/egcs-2.91.66
RX and TX bytes ok, but ifconfig <dev> does not show the data

$ ./busybox ifconfig eth0
$ ./busybox ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:04:32:12:B0
inet addr:192.168.1.7 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29367314 errors:7897 dropped:0 overruns:4062 frame:7897
TX packets:28362693 errors:0 dropped:0 overruns:0 carrier:38
collisions:252570
RX bytes:2138980197 (2039.8 Mb) TX bytes:2352078131 (2243.1 Mb)
Interrupt:5 Base address:0x250

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:165934 errors:0 dropped:0 overruns:0 frame:0
TX packets:165934 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:26595612 (25.3 Mb) TX bytes:26595612 (25.3 Mb)
--
***@pobox.com
Manuel Novoa III
2003-07-19 13:32:51 UTC
Permalink
Giulio,
Post by Giulio Orsero
linux-2.0.33/libc5/gcc version 2.7.2.3, latest busybox cvs
RX and TX bytes to 0 even if packets are > 0
$ ./busybox ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:50:04:36:80:2B
inet addr:192.168.1.117 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32230 errors:0 dropped:0 overruns:0 frame:0
TX packets:16662 errors:0 dropped:0 overruns:0 carrier:0
collisions:41
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:5 Base address:0x250
That's because linux-2.0.33 doesn't provide RX/TX byte numbers in /proc/net/dev.

If this really bothers anyone, it would be easy enough to disable that line of
output when no information is available.

Manuel
Giulio Orsero
2001-03-14 08:28:36 UTC
Permalink
linux-2.0.33/libc5/gcc version 2.7.2.3, latest busybox cvs

RX and TX bytes to 0 even if packets are > 0

$ ./busybox ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:50:04:36:80:2B
inet addr:192.168.1.117 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32230 errors:0 dropped:0 overruns:0 frame:0
TX packets:16662 errors:0 dropped:0 overruns:0 carrier:0
collisions:41
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:5 Base address:0x250

============================================
linux-2.2.16/glibc-2.1/egcs-2.91.66
RX and TX bytes ok, but ifconfig <dev> does not show the data

$ ./busybox ifconfig eth0
$ ./busybox ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:04:32:12:B0
inet addr:192.168.1.7 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29367314 errors:7897 dropped:0 overruns:4062 frame:7897
TX packets:28362693 errors:0 dropped:0 overruns:0 carrier:38
collisions:252570
RX bytes:2138980197 (2039.8 Mb) TX bytes:2352078131 (2243.1 Mb)
Interrupt:5 Base address:0x250

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:165934 errors:0 dropped:0 overruns:0 frame:0
TX packets:165934 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:26595612 (25.3 Mb) TX bytes:26595612 (25.3 Mb)
--
giulioo at pobox.com
Manuel Novoa III
2001-03-14 15:33:45 UTC
Permalink
Giulio,
Post by Giulio Orsero
linux-2.0.33/libc5/gcc version 2.7.2.3, latest busybox cvs
RX and TX bytes to 0 even if packets are > 0
$ ./busybox ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:50:04:36:80:2B
inet addr:192.168.1.117 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32230 errors:0 dropped:0 overruns:0 frame:0
TX packets:16662 errors:0 dropped:0 overruns:0 carrier:0
collisions:41
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:5 Base address:0x250
That's because linux-2.0.33 doesn't provide RX/TX byte numbers in /proc/net/dev.

If this really bothers anyone, it would be easy enough to disable that line of
output when no information is available.

Manuel

Loading...