CLEAR NET STATS PACHES ====================== ** General Summary These patches impliment linux support for zeroing out the statistics for your network device (packets received, errors, etc.) ** linux-$VERSION-clear_net_stats.patch This e clear_net_stats patches impliment support in the linux kernel for zero-ing the statistics for your network devices. The current version impliments the framework as well as support in the skge driver. I may add more drivers if there is interest. ** ethtool3-clear_net_stats.patch This is the user-space support for the above. It patches ethtool 3 to have the -Z flag. Usage is as simple as `ethtool -Z eth0`. FAQ === 1. Why is this useful? Professionally, I'm a linux sysadmins, and I specialize in large shops. Currently I admin roughly 2000 systems, and when we're trouble-shooting a network problem, we often clear interface statistics on the switch ports and router ports in question... but we also would like to clear the linux boxes' stats as well. By clearing them all quickly, we can easily get an idea of what the problem is without having to do extra work to save the original values, and do subtraction. 2. But you're a sysadmin - can't you just write a script to do this for you? Yup. In fact, some have been written. But, in my opinion, these are all just hacks around the problem that Linux doesn't support this feature. Note that in _most_ (but not all) cases, the stats are actually stored and maintained in *hardware* on the card. And every card I've run into that supports this, _also_ supports a command to clear these stats registers. You know why? Because that's really useful. So this is the linux support for it. 3. OK, so now that you've convinced me, why isn't it in mainline? Because I couldn't convince Jeff G. and David M. Feel free to try. ;) 4. Why not? David M. doesn't like adding anything into kernel-space that can be done in userspace, even if it's more effecient in kernel-space. That's an opinion I can respect even if I don't always agree. You can read the full discussion here: http://marc.theaimsgroup.com/?t=114843392900002&r=1&w=2 5. Why do you only have support in skge? / Can you add support for XXX? I've started working on support for epro100, but never finished it when I got frustrated with the hardware not conforming to the spec. I may pick it up again if there is interest. Those are the two cards I had easy access to. I can only work on drivers I have the hardware to test with. I have access to a few other cards these days, but I haven't exactly needed this support on my laptop. If you want to use this and your card isn't supported, drop me a line. I'm not saying I'll do it, but I'm not saying I won't, either. 6. I'm using the skge driver, and it doesn't work! The skge driver supports two families of cards: genesis and yukon. My card is a yukon, so I was only able to test with that. I was able to write support for genesis, but I was unable to test it. Feedback welcome. 7. The latest kernel version you've patched against is old and I'm having problems making your patch apply to 2.6.x[.y] - will you re-diff it against the latest kernel? Sure! Drop me an email and I'll be happy to. Phil Dibowitz phil AT ipom DOT com