Display a count of connected iTunes users

Feb 06, '07 07:30:00AM

Contributed by: ctierney

Some of my coworkers like to share iTunes on our LAN. It occurred to me that it would be fun (and maybe useful) to see how many people were streaming shared playlists at any given time. Aside from viewing status in the sharing prefs, I could find no obvious way to do this. So I whipped up a little shell script that watches for new connections on port 3689.

The script will write a list of IP numbers of remote iTunes clients to a log file, then name that file with the number of connections so that it could be seen in the Finder. Just create an empty folder somewhere and enter its path at the top of this script. Open this folder and position it wherever you want it to appear when users connect. If you select list view, the log file won't move around when the window is refreshed. Then have a cron job run it periodically.

[robg adds: Remember to make the script executable via chmod 755 script_name. The script worked well for me in testing. With minor modifications, you could have the script write the number to a file, then use Geeklog to display the contents of that file in a more visually interesting manor.]

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070203130451587