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

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
    This static field identifies if the gettid function is in the c library.
    static final boolean
    This static field identifies if the syscall for gettid returns sane results.
    static final boolean
    This static field identifies if the udev library can be loaded.

    Fields inherited from class oshi.software.common.AbstractOperatingSystem

    USE_WHO_COMMAND
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected oshi.software.os.OSProcess
    createOSProcess(int pid)
     
    oshi.software.os.FileSystem
     
    long
     
    oshi.software.os.NetworkParams
     
    long
     
    oshi.software.os.OSProcess
    getProcess(int pid)
     
    int
     
    List<oshi.software.os.OSSession>
     
    int
     
    int
     
    static long
    hz()
    Gets Jiffies per second, useful for converting ticks to milliseconds and vice versa.
    static long
    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, queryManufacturer

    Methods inherited from class oshi.software.common.AbstractOperatingSystem

    getBitness, getChildProcesses, getChildrenOrDescendants, getChildrenOrDescendants, getDescendantProcesses, getDesktopWindows, getFamily, getManufacturer, getProcesses, getVersionInfo, isElevated, toString

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface oshi.software.os.OperatingSystem

    getCurrentProcess, getProcesses, getProcesses
  • Field Details

    • HAS_UDEV

      public static final boolean HAS_UDEV
      This static field identifies if the udev library can be loaded.
    • HAS_GETTID

      public static final boolean HAS_GETTID
      This static field identifies if the gettid function is in the c library.
    • HAS_SYSCALL_GETTID

      public static final boolean HAS_SYSCALL_GETTID
      This static field identifies if the syscall for gettid returns sane results.
  • Constructor Details

    • LinuxOperatingSystemJNA

      public LinuxOperatingSystemJNA()
  • Method Details

    • getSessions

      public List<oshi.software.os.OSSession> getSessions()
      Specified by:
      getSessions in interface oshi.software.os.OperatingSystem
      Overrides:
      getSessions in class oshi.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:
      createOSProcess in class oshi.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:
      getHz in class oshi.software.common.os.linux.LinuxOperatingSystem
    • getPageSize

      public long getPageSize()
      Specified by:
      getPageSize in class oshi.software.common.os.linux.LinuxOperatingSystem
    • getThreadCount

      public int getThreadCount()