Thursday, March 24, 2011

View all network connections on OS X

If you're interested in seeing which of your Mac applications are connected to the internet you can try running the lsof (list open files) command.

1. Open (found in Applications -> Utilities)
2. Type lsof -i
3. Hit ENTER

lsof will now show you the list of network connections. If you have administrative rights you can run "sudo lsof -i" to see *all* connections, even those made by system processes such as daemons.

lsof outputs a variety of information by default but we're mostly interested in:

  • COMMAND - The name of the command or program
  • PID - Process ID of the connected program, you can use this to get more information about the program later. e.g You can look for this PID in Activity to see more statistics
  • USER - The name of the user running this app, usually this is your user name or "root" if the process is a system service/daemon
  • NAME - The address and port the application is connected to. If you see something similar to *.* or *: that means the application is listening for connections.

1 comment:

  1. Accepting gamers in South Korea, BK8 is another to supply 제왕카지노 each casino video games and sports activities betting. So, if it is online Roulette playing you might be} looking for, BK8 probably be} for you. Both offline and online playing legal guidelines Korea has adopted are stringent relating to locals. There is only one|is simply one} land-based playing home in South Korea that they'll legally visit.