Class LinuxOperatingSystemJNA
java.lang.Object
oshi.software.common.AbstractOperatingSystem
oshi.software.common.os.linux.LinuxOperatingSystem
oshi.software.os.linux.LinuxOperatingSystemJNA
- All Implemented Interfaces:
oshi.software.os.OperatingSystem
@ThreadSafe
public class LinuxOperatingSystemJNA
extends oshi.software.common.os.linux.LinuxOperatingSystem
JNA-based Linux operating system implementation. Extends
LinuxOperatingSystem, providing JNA implementations
of process/thread ID queries and thread count via sysinfo.-
Nested Class Summary
Nested classes/interfaces inherited from interface oshi.software.os.OperatingSystem
oshi.software.os.OperatingSystem.OSVersionInfo, oshi.software.os.OperatingSystem.ProcessFiltering, oshi.software.os.OperatingSystem.ProcessSorting -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanThis static field identifies if the gettid function is in the c library.static final booleanThis static field identifies if the syscall for gettid returns sane results.static final booleanThis static field identifies if the udev library can be loaded.Fields inherited from class oshi.software.common.AbstractOperatingSystem
USE_WHO_COMMAND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected oshi.software.os.OSProcesscreateOSProcess(int pid) oshi.software.os.FileSystemlonggetHz()oshi.software.os.NetworkParamslongoshi.software.os.OSProcessgetProcess(int pid) intList<oshi.software.os.OSSession> intintstatic longhz()Gets Jiffies per second, useful for converting ticks to milliseconds and vice versa.static longpageSize()Gets Page Size, for converting memory stats from pages to bytes.Methods inherited from class oshi.software.common.os.linux.LinuxOperatingSystem
getBootTime, getCurrentThread, getInstalledApplications, getInternetProtocolStats, getParentPidsFromProcFiles, getProcessCount, getReleaseFilename, getServices, getSystemBootTime, getSystemUptime, queryAllProcesses, queryBitness, queryChildProcesses, queryDescendantProcesses, queryFamilyVersionInfo, queryManufacturerMethods inherited from class oshi.software.common.AbstractOperatingSystem
getBitness, getChildProcesses, getChildrenOrDescendants, getChildrenOrDescendants, getDescendantProcesses, getDesktopWindows, getFamily, getManufacturer, getProcesses, getVersionInfo, isElevated, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface oshi.software.os.OperatingSystem
getCurrentProcess, getProcesses, getProcesses
-
Field Details
-
HAS_UDEV
public static final boolean HAS_UDEVThis static field identifies if the udev library can be loaded. -
HAS_GETTID
public static final boolean HAS_GETTIDThis static field identifies if the gettid function is in the c library. -
HAS_SYSCALL_GETTID
public static final boolean HAS_SYSCALL_GETTIDThis static field identifies if the syscall for gettid returns sane results.
-
-
Constructor Details
-
LinuxOperatingSystemJNA
public LinuxOperatingSystemJNA()
-
-
Method Details
-
getSessions
- Specified by:
getSessionsin interfaceoshi.software.os.OperatingSystem- Overrides:
getSessionsin classoshi.software.common.AbstractOperatingSystem
-
getFileSystem
public oshi.software.os.FileSystem getFileSystem() -
getNetworkParams
public oshi.software.os.NetworkParams getNetworkParams() -
getProcess
public oshi.software.os.OSProcess getProcess(int pid) -
createOSProcess
protected oshi.software.os.OSProcess createOSProcess(int pid) - Specified by:
createOSProcessin classoshi.software.common.os.linux.LinuxOperatingSystem
-
getProcessId
public int getProcessId() -
getThreadId
public int getThreadId() -
hz
public static long hz()Gets Jiffies per second, useful for converting ticks to milliseconds and vice versa.- Returns:
- Jiffies per second.
-
pageSize
public static long pageSize()Gets Page Size, for converting memory stats from pages to bytes.- Returns:
- Page Size in bytes.
-
getHz
public long getHz()- Specified by:
getHzin classoshi.software.common.os.linux.LinuxOperatingSystem
-
getPageSize
public long getPageSize()- Specified by:
getPageSizein classoshi.software.common.os.linux.LinuxOperatingSystem
-
getThreadCount
public int getThreadCount()
-