Where in /proc or /sys can I find the current bit rate?

David Goodenough david.goodenough
Sun Nov 12 12:03:40 PST 2006


On Sunday 12 November 2006 13:37, Dan Williams wrote:
> On Sun, 2006-11-12 at 10:35 +0000, David Goodenough wrote:
> > On Saturday 11 November 2006 22:59, Sam Schinke wrote:
> > > On Tuesday 07 November 2006 01:53, David Goodenough wrote:
> > > > I know that I can get the rate using iwconfig, but that involves
> > > > parsing the response and I would rather not do that if I can avoid
> > > > it.  But it occurred to me that most of the other values available
> > > > through iwconfig were available in either /proc or /sys, so I hoped
> > > > that I could find the current bit rate there too, but as yet I have
> > > > not found it.  Anyone got any idea where it might be?
> > >
> > > This would appear to be driver independent.
> > >
> > > I find the following on my laptop:
> > >
> > > laptop ~ # cat /proc/net/ndiswrapper/wlan0/hw | grep bit_rate
> > > bit_rate=48000 kBps
> >
> > That is not much good to me as I am using a native driver not an
> > ndiswrapper one.
> >
> > It really would be useful if this could be added to the native driver
> > and other drivers encouraged to use the same naming.
>
> Just use iwconfig, of call the ioctl() yourself!  Adding yet more fields
> to /sys/class/net/<dev>/ is probably a lost cause, let alone getting all
> drivers to do it.  BTW, proc is the _wrong_ place for this stuff, and
I am more than happy to have it in sys, I mentioned for proc more to day
that it was not even in proc.
> ndiswrapper shouldn't be putting its rate information there either.  In
> the above example ndiswrapper should be adding fields to its sysfs
Would be good to be in sysfs
> directory for the specific device; that's what sysfs is for.  What's the
> rate for?  If you're doing a stats display tool or something like that
> chances are you need more than rate already.  It's pretty easy to do the
> required ioctls in c, C++, or python.
I have a bunch of remote nodes on a wireless network, and I want to create
a display of the current datarates on each of the links.  I already have 
the node topography (from snmp) but I want the rate too.  I suppose I will
have to write a little C (the little embedded systems do not currently
have python installed and I am short of space to add it) program.  It 
just struck me that given that just about every other attribute of the
link is available that this should also be exposed.

David
>
> Dan
>
> > David
> >
> > > Regards,
> > > Sam
> > > _______________________________________________
> > > HostAP mailing list
> > > HostAP at shmoo.com
> > > http://lists.shmoo.com/mailman/listinfo/hostap
> >
> > _______________________________________________
> > HostAP mailing list
> > HostAP at shmoo.com
> > http://lists.shmoo.com/mailman/listinfo/hostap
>
> _______________________________________________
> HostAP mailing list
> HostAP at shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap




More information about the Hostap mailing list