Package org.apache.iotdb.commons.utils
Class ProcessIdUtils
- java.lang.Object
-
- org.apache.iotdb.commons.utils.ProcessIdUtils
-
public class ProcessIdUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ProcessIdUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetProcessId()There exists no platform-independent way that can be guaranteed to work in all jvm implementations.
-
-
-
Method Detail
-
getProcessId
public static java.lang.String getProcessId()
There exists no platform-independent way that can be guaranteed to work in all jvm implementations. ManagementFactory.getRuntimeMXBean().getName() looks like the best solution, and typically includes the PID. On linux+windows, it returns a value like "12345@hostname" (12345 being the process id).- Returns:
- process id of running Java virtual machine
-
-