From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ia0-x235.google.com (ia-in-x0235.1e100.net [IPv6:2607:f8b0:4001:c02::235]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id 0D12821F19C for ; Sat, 26 Jan 2013 10:22:18 -0800 (PST) Received: by mail-ia0-f181.google.com with SMTP id k25so2267762iah.40 for ; Sat, 26 Jan 2013 10:22:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=5MXgGR870oaHecxObCx7y7vGsY7/DIKHZBD/aCX9V5E=; b=VjBxlXhTszX0u0d9kEEwS01BeAtHqjPqgPClgUvekr6nr1GxK7bbksqcGcKbcaCqdh PECSGKcCaUAWjb0SUC0SUx3ZeLktTkDA1qFtW+SopMrMRwU90LS9LDlkecV7vXRazdLG B11c0uzxt3bAYOkjv8p0tcGmaquOuGXoGTb4i56egsLXMHPq8HICbog0UwHivv3/8p3i SiiY2kplphWzyRFECMkwuHBJT6y963x6z9A64QQQe1UcG+13j4xcJOZgUtQeWz2kqLz4 6hOi9P2SoPQHfIUa0MEBomBPIyRN2wDgKkPB1D98AxJ1RKJ5jaVRiXDYDiYqzsqZp0VW PC8w== MIME-Version: 1.0 X-Received: by 10.50.56.139 with SMTP id a11mr1452545igq.86.1359224538115; Sat, 26 Jan 2013 10:22:18 -0800 (PST) Received: by 10.64.135.39 with HTTP; Sat, 26 Jan 2013 10:22:17 -0800 (PST) Date: Sat, 26 Jan 2013 10:22:17 -0800 Message-ID: From: Dave Taht To: cerowrt-devel@lists.bufferbloat.net Content-Type: multipart/alternative; boundary=f46d0401f449c3b05004d4351fc0 Subject: [Cerowrt-devel] figuring out who's actually on an ap X-BeenThere: cerowrt-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development issues regarding the cerowrt test router project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jan 2013 18:22:19 -0000 --f46d0401f449c3b05004d4351fc0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Once upon a time it was possible to write quick and dirty tools in shell. You used to just be able to open a port, write a tiny little daemon, and go. And we used to have handy tools like rwho and finger to figure out who was online, ruptime to check uptime, etc, etc. That's too insecure nowadays... so we have 3 different levels of snmp which you can use (if you can secure it), and run a shell command from that, remotely, then parse... or use ssh, and parse. And then we have dhcp, which hands out leases, but is not tied to how wifi goes up and down. This morning I had a need to figure who was actually on a couple cerowrt APs, and a few statistics as to their connected rate... I haven't got so as figuring out how to do all that via snmpd yet, but as this uses an obscure feature of the mac802.11 stack, I thought I'd document this much= . If there is a better way, a mib, something, let me know.... #!/bin/sh # rup: quickly see whos really on the wifi A=3D`ls /sys/kernel/debug/ieee80211/phy*/netdev:*/stations | \ cut -f8 -d/ | tr '\n' '|'` # cut off last | egrep ${A%?} /tmp/dhcp.leases | awk '{print $3 " " $4 }' --=20 Dave T=E4ht Fixing bufferbloat with cerowrt: http://www.teklibre.com/cerowrt/subscribe.html --f46d0401f449c3b05004d4351fc0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Once upon a time it was possible to write quick and dirty tools in shell. Y= ou used to just be able to open a port, write a tiny little daemon, and go.= And we used to have handy tools like rwho and finger to figure out who was= online, ruptime to check uptime, etc, etc.

That's too insecure nowadays...
so we have 3 different levels of= snmp which you can use (if you can secure it), and
run a shell command = from that, remotely, then parse... or use ssh, and parse.

And then w= e have dhcp, which hands out leases, but is not tied to how wifi goes up and down.

This morning I had a need to figure who was actually on a = couple cerowrt APs,
and a few statistics as to their connected rate... <= br>
I haven't got so as figuring out how to do all that via snmpd ye= t, but as this uses
an obscure feature of the mac802.11 stack, I thought I'd document this = much.

If there is a better way, a mib, something, let me know....
#!/bin/sh
# rup: quickly see whos really on the wifi<= br>
A=3D`ls /sys/kernel/debug/ieee80211/phy*/netdev:*/stations | \
=A0= =A0=A0 cut -f8 -d/ | tr '\n' '|'`
# cut off last |
eg= rep ${A%?} /tmp/dhcp.leases | awk '{print $3 " " $4 }'



--
Dave T=E4ht

Fixing bufferbloat with cerowrt: http:= //www.teklibre.com/cerowrt/subscribe.html=20 --f46d0401f449c3b05004d4351fc0--