Package oshi.hardware.platform.unix.aix
Class AixGlobalMemory
- java.lang.Object
-
- oshi.hardware.common.AbstractGlobalMemory
-
- oshi.hardware.platform.unix.aix.AixGlobalMemory
-
- All Implemented Interfaces:
GlobalMemory
@ThreadSafe final class AixGlobalMemory extends AbstractGlobalMemory
Memory obtained by perfstat_memory_total_t
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Supplier<java.util.List<java.lang.String>>lscfgprivate static longPAGESIZEprivate java.util.function.Supplier<com.sun.jna.platform.unix.aix.Perfstat.perfstat_memory_total_t>perfstatMemprivate java.util.function.Supplier<VirtualMemory>vm
-
Constructor Summary
Constructors Constructor Description AixGlobalMemory(java.util.function.Supplier<java.util.List<java.lang.String>> lscfg)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private VirtualMemorycreateVirtualMemory()longgetAvailable()The amount of physical memory currently available, in bytes.longgetPageSize()The number of bytes in a memory pagejava.util.List<PhysicalMemory>getPhysicalMemory()Physical memory, such as banks of memory.longgetTotal()The amount of actual physical memory, in bytes.VirtualMemorygetVirtualMemory()Virtual memory, such as a swap file.private static com.sun.jna.platform.unix.aix.Perfstat.perfstat_memory_total_tqueryPerfstat()-
Methods inherited from class oshi.hardware.common.AbstractGlobalMemory
toString
-
-
-
-
Field Detail
-
perfstatMem
private final java.util.function.Supplier<com.sun.jna.platform.unix.aix.Perfstat.perfstat_memory_total_t> perfstatMem
-
lscfg
private final java.util.function.Supplier<java.util.List<java.lang.String>> lscfg
-
PAGESIZE
private static final long PAGESIZE
- See Also:
- Constant Field Values
-
vm
private final java.util.function.Supplier<VirtualMemory> vm
-
-
Method Detail
-
getAvailable
public long getAvailable()
Description copied from interface:GlobalMemoryThe amount of physical memory currently available, in bytes.- Returns:
- Available number of bytes.
-
getTotal
public long getTotal()
Description copied from interface:GlobalMemoryThe amount of actual physical memory, in bytes.- Returns:
- Total number of bytes.
-
getPageSize
public long getPageSize()
Description copied from interface:GlobalMemoryThe number of bytes in a memory page- Returns:
- Page size in bytes.
-
getVirtualMemory
public VirtualMemory getVirtualMemory()
Description copied from interface:GlobalMemoryVirtual memory, such as a swap file.- Returns:
- A VirtualMemory object.
-
getPhysicalMemory
public java.util.List<PhysicalMemory> getPhysicalMemory()
Description copied from interface:GlobalMemoryPhysical memory, such as banks of memory.On Linux, requires elevated permissions. On FreeBSD and Solaris, requires installation of dmidecode.
- Specified by:
getPhysicalMemoryin interfaceGlobalMemory- Overrides:
getPhysicalMemoryin classAbstractGlobalMemory- Returns:
- A list of PhysicalMemory objects.
-
queryPerfstat
private static com.sun.jna.platform.unix.aix.Perfstat.perfstat_memory_total_t queryPerfstat()
-
createVirtualMemory
private VirtualMemory createVirtualMemory()
-
-