On Linux, lsof has a -e and + e switch, which can be used to exclude some volumes from the search. This is useful in cases where the user has no rights to do much on these volumes.
We can not get that on the Mac. When I use lsof to check which process is monitoring a particular TCP port, I encounter this error:
bash-3.2 $ lsof -P -i TCP: 80 -sTCP: LISTEN lsof: WARNING: stat () can not maintain the file system /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/elm/2018-11-22-135444/Macintosh HD Output information may be incomplete. "dev = 31000028" is accepted by the mount table
Works, if I Sudo, but that is uncomfortable. Proposals?