Class MemoryInfo

java.lang.Object
io.jenkins.plugins.specsmonitor.MemoryInfo
All Implemented Interfaces:
Serializable

@ExportedBean public class MemoryInfo extends Object implements Serializable
Total, free and available physical memory (RAM) of a node.
See Also:
  • Constructor Details

    • MemoryInfo

      public MemoryInfo(long totalBytes)
      Parameters:
      totalBytes - total physical memory in bytes, or a value <= 0 if unknown
    • MemoryInfo

      public MemoryInfo(long totalBytes, long freeBytes, long availableBytes)
      Parameters:
      totalBytes - total physical memory in bytes, or a value <= 0 if unknown
      freeBytes - memory that is completely unused, or a negative value if unknown
      availableBytes - memory that can be used by applications without swapping (free memory plus reclaimable caches), or a negative value if unknown
  • Method Details

    • getTotalBytes

      @Exported public long getTotalBytes()
    • getFreeBytes

      @Exported public long getFreeBytes()
    • getAvailableBytes

      @Exported public long getAvailableBytes()
    • getUsableBytes

      @Exported public long getUsableBytes()
      Memory that applications can use right now: the available memory if known, otherwise the free memory.
    • getDisplay

      public String getDisplay()
      Human-readable available (or free) memory using binary units, e.g. 43.5 GiB, or N/A.
    • getTooltip

      public String getTooltip()
      Tooltip text, e.g. 43.5 GiB free of 63.7 GiB. If the operating system reports different values for available memory (usable without swapping, including reclaimable caches) and free memory (completely unused), both are shown, e.g. Available: 8.4 GiB of 15.6 GiB, Free: 1.2 GiB. Empty if neither is known.
    • toString

      public String toString()
      Overrides:
      toString in class Object