Command line and network activity

Trying to find a command (if such exists) that can show current network activity and also who has been connected to my machine over the network.

Thanx in advance.

Macbook, iMac, Macbook Pro, Mac Pro, Mac OS X (10.5.5)

Posted on Nov 2, 2008 6:48 AM

Reply
4 replies

Nov 2, 2008 8:37 AM in response to Worm76

Not very clear what you want. You can see who is connected to your Mac with this Applescript:

tell application "Terminal"
if not (exists window 1) then do script ""
do script "netstat -na | grep 548" in front window
end tell


However, that only reports AFP port connections.

You can see who is connected to your iTunes with this script:

tell application "Terminal"
if not (exists window 1) then do script ""
do script "lsof -c iTunes -a -i" in front window
do script "arp -a" in front window
end tell

Nov 2, 2008 9:39 AM in response to Gnarlodious

I know how to find out who are connected to my machine, but my question is if there is any way to see how has been connected to it in the past, its a pain in the a** monitoring this all day 🙂

If you have a script or just a simple command that can show who was connected during the day i´ll be one happy man on monday.

Thanks for all the advice so far.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Command line and network activity

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.