Class SysctlUtil
java.lang.Object
oshi.util.platform.mac.SysctlUtil
Provides access to sysctl calls on macOS
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryExecutes a sysctl call with a Pointer resultstatic intExecutes a sysctl call with an int resultstatic intExecutes a sysctl call with an int resultstatic longExecutes a sysctl call with a long resultstatic booleanExecutes a sysctl call with a Structure resultstatic StringExecutes a sysctl call with a String resultstatic StringExecutes a sysctl call with a String result
-
Method Details
-
sysctl
Executes a sysctl call with an int result- Parameters:
name- name of the sysctldef- default int value- Returns:
- The int result of the call if successful; the default otherwise
-
sysctl
Executes a sysctl call with an int result- Parameters:
name- name of the sysctldef- default int valuelogWarning- whether to log the warning if not available- Returns:
- The int result of the call if successful; the default otherwise
-
sysctl
Executes a sysctl call with a long result- Parameters:
name- name of the sysctldef- default long value- Returns:
- The long result of the call if successful; the default otherwise
-
sysctl
-
sysctl
Executes a sysctl call with a String result- Parameters:
name- name of the sysctldef- default String valuelogWarning- whether to log the warning if not available- Returns:
- The String result of the call if successful; the default otherwise
-
sysctl
-
sysctl
-