Class NetBsdSysctlUtil

java.lang.Object
oshi.util.common.platform.unix.netbsd.NetBsdSysctlUtil

@ThreadSafe public final class NetBsdSysctlUtil extends Object
Provides access to sysctl calls on NetBSD via command-line execution. This implementation does not require JNA native library support.
  • Method Details

    • sysctl

      public static int sysctl(String name, int def)
      Executes a sysctl call with an int result
      Parameters:
      name - name of the sysctl
      def - default int value
      Returns:
      The int result of the call if successful; the default otherwise
    • sysctl

      public static long sysctl(String name, long def)
      Executes a sysctl call with a long result
      Parameters:
      name - name of the sysctl
      def - default long value
      Returns:
      The long result of the call if successful; the default otherwise
    • sysctl

      public static String sysctl(String name, String def)
      Executes a sysctl call with a String result
      Parameters:
      name - name of the sysctl
      def - default String value
      Returns:
      The String result of the call if successful; the default otherwise