Package oshi.util
Class LsofUtil
java.lang.Object
oshi.util.LsofUtil
@ThreadSafe public final class LsofUtil extends java.lang.Object
Reads from lsof into a map
-
Method Summary
Modifier and Type Method Description static java.util.Map<java.lang.Integer,java.lang.String>
getCwdMap(int pid)
Gets a map containing current working directory info
-
Method Details
-
getCwdMap
public static java.util.Map<java.lang.Integer,java.lang.String> getCwdMap(int pid)Gets a map containing current working directory info- Parameters:
pid
- a process ID, optional- Returns:
- a map of process IDs to their current working directory. If
pid
is a negative number, all processes are returned; otherwise the map may contain only a single element forpid
-