Class FstatUtil


  • @ThreadSafe
    public final class FstatUtil
    extends java.lang.Object
    Reads from fstat.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private FstatUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getCwd​(int pid)
      Gets current working directory info (using ps actually).
      static long getOpenFiles​(int pid)
      Gets open number of files.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FstatUtil

        private FstatUtil()
    • Method Detail

      • getCwd

        public static java.lang.String getCwd​(int pid)
        Gets current working directory info (using ps actually).
        Parameters:
        pid - a process ID
        Returns:
        the current working directory for that process.
      • getOpenFiles

        public static long getOpenFiles​(int pid)
        Gets open number of files.
        Parameters:
        pid - The process ID
        Returns:
        the number of open files.