lsof for smartos, re-implemented in bash using native methods for finding such things