iproute2 vs net-tools on x86_64

Zachary Kotlarek zach at kotlarek.com
Sun Jun 22 11:20:54 MDT 2008


On Jun 22, 2008, at 10:05 AM, Alexander E. Patrakov wrote:

> The problem is that iproute2 wraps its traffic counters at 4GB  
> (i.e., uses
> 32-bit counters), while the old "ifconfig" command from net-tools  
> doesn't.
> Unwrapped (64-bit) counters are, obviously, available from /proc/net/ 
> dev. So,
> is our "by default, use iproute2 only" choice justified enough?


I would suggest that parsing the output from ifconfig, ip, or even / 
proc/net/dev should be deprecated -- over the years parsing the output  
of ifconfig has always been broken eventually, and there's no reason  
think iproute2 will be any better.

The format of /proc/net/dev is somewhat less likely to change, but all  
the statistics it provides are available in a pre-digested form at:
	/sys/class/net/<interface_name>/statistics/<statistic_name>
which seems easier to read and should be more robust even if new  
statistics are added.

	Zach

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1682 bytes
Desc: not available
Url : http://linuxfromscratch.org/pipermail/lfs-dev/attachments/20080622/cf919e09/attachment.bin 


More information about the lfs-dev mailing list