Monitoring Network Bandwidth

I've long harbored a suspicion that my Comcast service isn't as fast as it is billed to be, so I started looking around for a way to see what was going on.

On our little home network, served by a Time Capsule, we have:

  • 2 MacBook Airs
  • 1 Apple TV
  • An assortment of iDevices

…all of which use the WiFi network to talk to the outside world. I needed a way to quantify just how much bandwidth we were using, in order to see if we were saturating the "pipe".

Enter NetUse, a neat little SNMP monitoring app that works with our Time Capsule (which is our primary router) and tracks the network use over time. It was a bit difficult to setup (I believe I'm monitoring the vlan0 interface on the Time Capsule), but once you get it going, you can easily see how much bandwidth you're using and when.

You can find NetUse with all of the other great Mac Apps at the Mac App Store.

Edit

Later on, it was noted that you could use Cacti to achieve the same goal, if you have a spare linux box sitting around.

Changes 1.0.2 Out - To GC or not to GC, That Is the Question…

Changes 1.0.2 was a very difficult release. Sometimes, in the rush to ship, quality doesn't slide, but things are either left out or intentionally tabled for a future release. Hopefully, in 1.0.2 I've sewn a lot of those issues up. A few highlights of this release:

  • Directory comparison stability improved.
  • Save Original As… and Save Modified As… in the text diff utility added.
  • Cmd+Left and Cmd+Right key shortcuts changed to something more sensible.
  • App icon tweaked
  • Line matching algorithm accuracy greatly improved.

Changes has a 15-day free and unlimited demo, so why don't you check it out!

Indispensable Power Tool for OS X Developers

If you're an OS X developer and you don't know about OTX, you're really missing out. It's an awesome tool for peering into apps and frameworks that you might not have the source for (or for totally legit uses like making sense of user-submitted crash logs). I heard from the developer (who shall remain nameless, but is one of the coolest dudes in the OS X dev community), that the subversion branch you currently want to use is: http://otx.osxninja.com/builds/trunk/ My Recommendation: You need this tool. Here's a more in-depth explanation as to why.

Brawndo - The Quicklook MUTILATOR

I was surfing the web looking for dumb stuff and ran across the Brawndo site. Noticing that a new logo was available, I quickly downloaded it and observed that the Dock proceeded to crash, restart, crash, restart, and so on. Thinking it was just another temporary "Leopard has gone batshit insane" moment (I've experienced more than a few of these), I rebooted the box. Imagine my surprise when after rebooting, the Dock continued to crash and restart.

First order of business: stop the Dock from crashing. I headed to the Dock.app folder and renamed the executable within to Dock.old. After doing this I was finally able to attach gdb to it and grab a backtrace from the crash:

#0  0x95077680 in objc_exception_throw ()
#1  0x91760108 in -[NSObject doesNotRecognizeSelector:] ()
#2  0x9175e704 in ___forwarding___ ()
#3  0x9175e998 in __forwarding_prep_0___ ()
#4  0x91687ba4 in CFArrayAppendValue ()
#5  0x95581e2c in storeDataInXMPDictionary ()
#6  0x96b4e308 in xmlParseAttributeType ()
#7  0x96b22be4 in xmlParseElement ()
#8  0x96b237c8 in xmlParseContent ()
#9  0x96b227fc in xmlParseElement ()
#10 0x96b237c8 in xmlParseContent ()
#11 0x96b227fc in xmlParseElement ()
#12 0x96b237c8 in xmlParseContent ()
#13 0x96b227fc in xmlParseElement ()
#14 0x96b237c8 in xmlParseContent ()
#15 0x96b227fc in xmlParseElement ()
#16 0x96b237c8 in xmlParseContent ()
#17 0x96b227fc in xmlParseElement ()
#18 0x96b1fbf8 in xmlParseDocument ()
#19 0x96b1d95c in xmlSAXParseMemoryWithData ()
#20 0x95580778 in readXMPProps ()
#21 0x955a2d10 in readXMPData ()
#22 0x955a0708 in initImageJPEG ()
#23 0x95572eb4 in makeImagePlus ()
#24 0x95577c74 in CGImageSourceGetPropertiesAtIndex ()
#25 0x95577ba8 in CGImageSourceCopyPropertiesAtIndex ()
#26 0x94fb9b70 in _QLCreateThumbnailWithImageSource ()
#27 0x94fba138 in _QLCreateThumbnailWithImageIO ()
#28 0x94fbe8e4 in QLThumbnailRequestSetImageAtURL ()
#29 0x94fbd44c in _QLImageGenerateThumbnailForFile ()
#30 0x94fbdf34 in _QLThumbnailRequestDispatch ()
#31 0x94fb7090 in _QLThumbnailGetImageIfNecessary ()
#32 0x94fb7370 in QLThumbnailCopyImage ()
#33 0x94fb744c in QLThumbnailImageCreate ()
#34 0x000acc4c in ?? ()
#35 0x912deda0 in __NSThread__main__ ()
#36 0x92614bfc in _pthread_start ()

Hmm, I see Quicklook and some Quartz jpeg loading stuff in there. Wonderful. Time to use fs_usage and see which file was causing the grief.

"brawndo_logo.jpg"

No way. This is just too funny. Filed as bug rdar://problem/5657300. Head to the brawndo site to download the file for yourself, if you dare. Anything which uses Quicklook to generate image thumbnails will crash and burn on this file.

Postscript: I realize that this is probably a Quartz issue - however Safari doesn't blow chunks when it tries to load the file and I'm not going to dig any deeper.

Post-postscript:Wolf dug deeper.

In Memoriam: A Brother Lost

Captain Joshua Steele lost his life on Father's Day, June 17th, 2007. He was my fraternity brother at the Gamma Lambda Chapter of the Pi Kappa Phi fraternity in Rolla and a dear friend. I remember him as a gentle soul, devoted to his faith, his family, his country, and his brothers. I will understate his merits if I describe him as a true scholar and a valiant warrior. He will be missed terribly by all. My condolences to his mother, father, and family. Go in peace brother, you belong to the ages now. I'm unworthy of writing your eulogy. Update: Josh's sister Gina Steele notified me of this tribute to her brother.

Success! (Damn Nagle's Algorithm)

I'm on the "downward slope" of my research project and am beginning the final testing/writing phase of my MS thesis in Computer Science. I've been fighting the effects of Nagle's algorithm for months now without knowing it, wondering why these tiny messages I was attempting to send via TCP/IP sockets were taking so long to propagate across the network. I also made the realization that my RPC framework (the aforementioned research project) is very sensitive to latency. In other words, it performs like crap in high-latency situations. Oh well, lesson learned. The Missouri trip has been a nice break. For the last year and a half of my life, I've been plugged into the iMemories scene. While I definitely enjoyed it, I needed a vacation and a change of pace, which is what I've found at UMR. P.S. Belated congrats to Daniel Jalkut on his marriage. The iPod socks are being re-routed to my house as you are away on your honeymoon. I'll deliver them to you at WWDC.

Desktop vs. Web Apps - The War is Over

We were all told that there could only be one winner in the Battle Royale pitting web apps against desktop apps. That argument was flawed, perhaps fatally flawed, and Brent Simmons nails the reason why in his blog post "The end of 'desktop vs. web apps'". Of course, this builds on the theme from last year's C4[0] conference, which coincidentally had Brent delivering a lecture on the hybridization of desktop applications.

This post is a must-read for anyone interested in developing applications in the present or the near future.

PyObjC TextMate Bundle

I've been writing a lot of PyObjC code lately in TextMate. I found that there really wasn't a good way to execute py2app based project in TextMate, which was considerably lengthing my hack/test/debug cycle. So I created a PyObjC bundle, and whipped up a little Build & Run PyObjC command which is activated by hitting Cmd+5 when you're in a python scope.

This command depends on having an actual TextMate project to contain your code and the latest version of py2app (available via easy_install). The bundle will also find and parse any error messages that happen to fly out of your program, in order to link them back to your source code documents in TextMate. Feel free to email me (ibaird at this-blog's-domain ) with any comments or queries regarding this bundle.

Update (4/25/07): I've updated the bundle in the link above to fix an issue I was having with the "app bundle finding" logic. This should fix any issues with the script.

RubyCocoa Presentation Notes

Thanks again to PRUG for allowing me to show off a little bit of RubyCocoa. Great folks who run a great group, I'll be sure to attend again soon. RubyCocoa (Unstable) Build Instructions You'll need OS X 10.4 or above and Xcode 2.4.1 to build RubyCocoa. Here are the build instructions for unstable (a release is due out around April 30th):

  1. svn co https://rubycocoa.svn.sourceforge.net/svnroot/rubycocoa/trunk/src rubycocoa-unstable
  2. cd rubycocoa-unstable
  3. ruby install.rb config
  4. ruby install.rb setup
  5. sudo ruby install.rb install

Resources Remember, /Developer/Examples/RubyCocoa is your friend. So is the RubyCocoa resource site. The book I recommended to all novice Cocoa developers was Aaron Hillegass's book Cocoa(R) Programming for Mac(R) OS X (2nd Edition). Postscript I had a great time presenting and enjoyed the wonderful conversation at Carraba's after the event. Thanks again for putting up with me, as I was tired and getting rather giddy towards the end of the evening!