iTunes: List of who's listening to my shared library

Is there an easy way to display a list of users on my local network who are listening to my shared iTunes library? I’ve started researching and found this shell command netstat -an | grep LISTEN, but I’d like to go one step further and display the user name who’s logged on.

Thanks - Jason

(I added spaces around the pipe there.) I know I’ve seen various command-line ways of getting some of this information; Would you give us a link to any articles that you’ve been using?

Edit: FYI: What Are People Listening 2?

Hi Jason,

with the netstat - LISTEN command you can’t retrieve any information about listening to the local iTunes library
but I found out, that the ESTABLISHED lines whose third field is not zero, include the IP address/port of the listening machine(s)

set a to paragraphs of (do shell script "netstat -an | awk '/ESTABLISHED/ {print $3, $5}'")
set b to {}
repeat with i in a
	if word 1 of i is not "0" then set end of b to word 2 of contents of i
end repeat
b

Stefan -
Thanks for the help, but I wasn’t able to get a result from it. I made sure that someone was connected and ran the AS, but it only returned {}. Not sure why it wouldn’t work.

Thanks - Jason

Connected isn’t sufficient. The script detects, if somebody is just playing a track from your library

oh okay, that worked. I guess there’s no way to pull the name of the user logged on to that machine, even if it is on a local network?