One of the best things about working at Bocoup has been the fabulous lineups of speakers we've had over the past year and the top-notch development squads who show up month-after-month to learn/lobby/scheme over querying, scripting, and visualizing the future.
Our event crowds have (more often than we've even expected) been so large that we've had to worry about having enough space on our current wireless router for everyone's laptops, cell phones, and tablets.
As someone who is at the same time a data-mining junkie, data visualization afficionado, and responsible for helping maintain our local wireless network, I wanted to track and visualize routing performance statistics enhance our ability to appropriate network resources for our employees, partners/clients, coworkers, trainees, Gratis et Libre participants, and event attendees.
Our current Cisco wireless router happens to have a network management screen whereby we can see a list of all of the devices who have been given IP address leases from our DHCP server, along with each device's MAC addresses and time remaining on their current session.
I've been working with PHP and wget lately on a few projects and decided to script some custom reports to give us more timely access to our active and available wireless resources.
Here's a quick bash script that I've scheduled with crontab to run every minute that grabs an HTML page from our router. Every router is going to have slightly different managment screens so consider that part of this article your homework. If you happen to be using a Linksys E-Series router you'll find your DHCP routing table by clicking on a button or link like this in your administration panel.
Once the raw data from our router has been stored locally we can just use something like PHP to parse it into an array and then count the number of records ....From that PHP script we now have our magic number of remaining DHCP addresses which can now be easily show on an HTML page to be reloaded every minute or so via AJAX (or even a meta-refresh if you're in a hurry).
The available data from this particular router isn't very extensive but I think I've managed to learn a few things from this exercise:
In case you haven't heard, Bocoup is moving to an even better space next month just one block away above Lucky's Lounge on Congress Street (yes we're upgrading our wireless router too!). I'll look forward to seeing everyone there and hope you'll can help me dream up the next round of "Event Hacking".