Class LinuxGlobalMemory

java.lang.Object
oshi.hardware.common.AbstractGlobalMemory
oshi.hardware.platform.linux.LinuxGlobalMemory
All Implemented Interfaces:
GlobalMemory

@ThreadSafe
public final class LinuxGlobalMemory
extends AbstractGlobalMemory
Memory obtained by /proc/meminfo and sysinfo.totalram
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static long PAGE_SIZE  
  • Constructor Summary

    Constructors 
    Constructor Description
    LinuxGlobalMemory()  
  • Method Summary

    Modifier and Type Method Description
    long getAvailable()
    The amount of physical memory currently available, in bytes.
    long getPageSize()
    The number of bytes in a memory page
    long getTotal()
    The amount of actual physical memory, in bytes.
    VirtualMemory getVirtualMemory()
    Virtual memory, such as a swap file.

    Methods inherited from class oshi.hardware.common.AbstractGlobalMemory

    getPhysicalMemory, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • PAGE_SIZE

      public static final long PAGE_SIZE
  • Constructor Details

  • Method Details

    • getAvailable

      public long getAvailable()
      Description copied from interface: GlobalMemory
      The amount of physical memory currently available, in bytes.
      Returns:
      Available number of bytes.
    • getTotal

      public long getTotal()
      Description copied from interface: GlobalMemory
      The amount of actual physical memory, in bytes.
      Returns:
      Total number of bytes.
    • getPageSize

      public long getPageSize()
      Description copied from interface: GlobalMemory
      The number of bytes in a memory page
      Returns:
      Page size in bytes.
    • getVirtualMemory

      public VirtualMemory getVirtualMemory()
      Description copied from interface: GlobalMemory
      Virtual memory, such as a swap file.
      Returns:
      A VirtualMemory object.