See What Files & Ports an Application is Using with Activity Monitor
The OS X task management tool Activity Monitor includes an excellent and little known feature that lets you see precisely what files, ports, and IP’s are being interacted with by any single process or application. Here is how to use it:
- Launch Activity Monitor, found in /Applications/Utilities/
- Double-click on the process or application name you want to see open files and ports for
- Click the “Open Files and Ports” tab
The list is scrollable and shows full paths to all files that are being interacted with by the application/process. Much of the data will be unfamiliar to many users, with obscure system files, caches, and plists being accessed, but you’ll also find paths that are easy to identify which can be helpful in resolving system conflicts and troubleshooting certain problems. Similar filesystem access data can be provided with the command line tool opensnoop, but for most Mac users the GUI Activity Monitor will be more friendly to their needs.
Ports are identified as numbers, and you’ll also be able to see the IP’s of any active internet or network connections that have been opened by the application. The data is presented a little rough, if you want an easier to browse version of open network connections take a look at the free GUI tool PrivateEye. IP and port data can also be uncovered through the command line tool lsof if you’re more technically inclined.