Class OSMXBean


  • public class OSMXBean
    extends java.lang.Object
    This class is a wrapper for the implementation of com.sun.management.UnixOperatingSystemMXBean It will decide to use the sun api or its own implementation depending on the runtime (vendor) used.
    • Constructor Summary

      Constructors 
      Constructor Description
      OSMXBean()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getMaxFileDescriptorCount()
      Get the number of the maximum file descriptors the system can use.
      long getOpenFileDescriptorCount()
      Get the number of opened filed descriptor for the runtime jvm.
      boolean getUnix()
      Check if the OS is unix.
      • Methods inherited from class java.lang.Object

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

      • OSMXBean

        public OSMXBean()
        Constructor. Get the running Operating System instance
    • Method Detail

      • getUnix

        public boolean getUnix()
        Check if the OS is unix. If using the IBM java runtime, this will only work for linux.
        Returns:
        whether this is unix or not.
      • getOpenFileDescriptorCount

        public long getOpenFileDescriptorCount()
        Get the number of opened filed descriptor for the runtime jvm. If sun java, it will use the com.sun.management interfaces. Otherwise, this methods implements it (linux only).
        Returns:
        number of open file descriptors for the jvm
      • getMaxFileDescriptorCount

        public long getMaxFileDescriptorCount()
        Get the number of the maximum file descriptors the system can use. If sun java, it will use the com.sun.management interfaces. Otherwise, this methods implements it (linux only).
        Returns:
        max number of file descriptors the operating system can use.