On Wed, 2006-01-18 at 14:37 -0800, Ben Greear wrote: > Roberto Nibali wrote: > >>> It looks like the e1000 driver gathers all kinds of stats. How do I > >>> access these from userspace? > >> > >> > >> /proc/net/dev will have many of the common ones, and ethtool should > >> get the rest. > >> > >> If you want a hack, I have a patch against the ethtool logic that > >> allows user-space to grab the netdev->stats struct and copy it > >> directly to user-space. This is easier and most likely more efficient > >> than parsing the /proc/net/dev file. > > > > > > Yes, please ;). I'd be interested in this patch as well. > > I'm manually pasting this out of my consolidated patch..it's against 2.6.15. > You should be able to ignore the send-to-self and crc related logic w/out > incident. > > If this won't work, I can send you a link to my full patch, but it has a lot > more than just this netdev stats hack in it....
It makes no sense to extend ethtool for something generic like that. It shouldn't be that hard to do netlink in some richer scripting language (like perl), but I haven't tried. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html