python mac os how to know if a port is ocupied code example Example: mac terminal find process by port sudo lsof -i tcp:3000