lsof lists information about files opened by processes for the varios UNIX dialects.
Type the following command to update current ports collection and install lsof from ports:
# portsnap fetch update
# cd /usr/ports/sysutils/lsof
# make install clean