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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to