Re: [PATCH updated] net: add ability to clear per-interface networkstatistics via procfs

From: Rick Jones
Date: Fri May 16 2008 - 16:09:32 EST


David Miller wrote:
From: James Cammarata <jimi@xxxxxxxx>
Date: Fri, 16 May 2008 10:18:14 -0500

We saw your initial patch posting, you don't need to send this
again.

netdev added to CC:


From: James Cammarata <jimi@xxxxxxxx>

Added the ability to write to /proc/net/dev in order to clear the
interface counters for a given interface. The ability to zero out
counters (especially the error counters) is extremely useful when
troubleshooting interface issues. Now diffed against 2.6.25.4, and
added some sanity checking.

Syntax:
echo 'net clear-stats ifdev' > /proc/net/dev
Where "ifdev" is the device name you wish to clear.

I don't wish to suggest I don't like the change - I've used similar features on "other oses" in the past, but when something like this has come-up in the past, haven't there been concerns about MIBs and SNMP and whatnot?

rick jones
ftp://ftp.cup.hp.com/dist/networking/tools - beforeafter - subtract one set of stats from another...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/