Class AixGlobalMemory
java.lang.Object
oshi.hardware.common.AbstractGlobalMemory
oshi.hardware.common.platform.unix.aix.AixGlobalMemory
- All Implemented Interfaces:
GlobalMemory
Abstract base for AIX GlobalMemory. The public
AbstractGlobalMemory API translates
perfstat_memory_total_t fields into bytes; getPhysicalMemory() parses the shared lscfg
supplier passed in from the HAL. Subclasses provide the perfstat field accessors and the matching
AixVirtualMemory.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongThe amount of physical memory currently available, in bytes.longThe number of bytes in a memory pagePhysical memory, such as banks of memory.longgetTotal()The amount of actual physical memory, in bytes.abstract VirtualMemoryConstructs the matchingAixVirtualMemory(JNA or FFM) for this instance.protected abstract longReadsperfstat_memory_total_t.real_avail(4 KB pages) via the subclass.protected abstract longReadsperfstat_memory_total_t.real_total(4 KB pages) via the subclass.Methods inherited from class AbstractGlobalMemory
toString
-
Field Details
-
PAGESIZE
protected static final long PAGESIZE- See Also:
-
lscfg
-
-
Constructor Details
-
AixGlobalMemory
-
-
Method Details
-
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.
-
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.
-
queryRealAvail
protected abstract long queryRealAvail()Readsperfstat_memory_total_t.real_avail(4 KB pages) via the subclass.- Returns:
- real_avail in pages
-
queryRealTotal
protected abstract long queryRealTotal()Readsperfstat_memory_total_t.real_total(4 KB pages) via the subclass.- Returns:
- real_total in pages
-
getVirtualMemory
Constructs the matchingAixVirtualMemory(JNA or FFM) for this instance.- Returns:
- the VirtualMemory paired with this GlobalMemory implementation
-