AW: ethernet statistics
fbsd.questions at rachie.is-a-geek.net
Thu Sep 25 16:20:43 UTC 2008
On Thursday 25 September 2008 17:52:07 Dan Nelson wrote:
> In the last episode (Sep 25), Vonarburg, David said:
> > netstat -i is ok for a user to get system statictics. I'd like get
> > exactly this information but as a function call inside a "C" language
> > application
> netstat -i still digs into kernel memory to get those stats, I think,
> so you can't directly access those numbers as a regular user.
All those vars are available through sysctl. For an example, look in
src/in_sysctl.c from net/bmon port.
Problem with today's modular software: they start with the modules
and never get to the software part.
More information about the freebsd-questions