[ale] Help on device driver hacking
Christopher Fowler
cfowler at outpostsentinel.com
Wed May 21 12:45:26 EDT 2003
On Wed, May 21, 2003 at 12:28:22PM -0400, Doug McNash wrote:
> Do 'cat /proc/net/dev' and you can pick off #packets and
> #total bytes per interface. There maybe other statistics
> in the vast proc filesystem you might be interested in.
> If you want to add custom statistics I would start
> looking at the section of code that outputs the /proc
> info.
Yep, /proc interface is the best way to go to get/store
this data. In 2.5.X it will be sysfs but on 2.4 and below it is proc.
If you need even more stats, you'll need to modify the network driver
to store that info. Then create a custome proc interface that will display
the data when a process tries to open the proc file.
>
> >Also can somebody guide me(or give a few
> >hints/references) on how to program
> >a NIC device driver to record number/size of packets
> >transferred over the
> >NIC.
> --
> Doug McNash
> dmcnash at smyrnacable.net
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list