Class AixHWDiskStore
java.lang.Object
oshi.hardware.common.AbstractHWDiskStore
oshi.hardware.common.platform.unix.aix.AixHWDiskStore
- All Implemented Interfaces:
HWDiskStore
Abstract base for AIX HWDiskStore. The
updateAttributes() math (rough read/write split from total transfers
and block counts, monotonic-increase enforcement) is shared; subclasses fetch the per-disk stats from their
respective perfstat driver.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classPer-disk stats fields the AIX HAL reads. -
Field Summary
Fields inherited from class AbstractHWDiskStore
currentQueueLength, partitionList, readBytes, reads, timeStamp, transferTime, writeBytes, writesModifier and TypeFieldDescriptionprotected longprotected final AtomicReference<List<HWPartition>> protected longprotected longprotected longprotected longprotected longprotected long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAixHWDiskStore(String name, String model, String serial, long size) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract AixHWDiskStore.DiskStatsLooks up this disk's per-disk stats from the subclass's perfstat data source.booleanMake a best effort to update all the statistics about the drive without needing to recreate the drive list.Methods inherited from class AbstractHWDiskStore
getCurrentQueueLength, getDiskType, getModel, getName, getPartitions, getReadBytes, getReads, getSerial, getSize, getTimeStamp, getTransferTime, getWriteBytes, getWrites, setDiskStats, setPartitionList, toStringModifier and TypeMethodDescriptionlongThe length of the disk queue (#I/O's in progress).The type of the disk, such as SSD, HDD, Removable, Virtual, or Unknown.getModel()The disk modelgetName()The disk nameThe partitions on this disk.longThe number of bytes read from the disklonggetReads()The number of reads from the diskThe disk serial number, if available.longgetSize()The size of the disklongThe time this disk's statistics were updated.longThe time spent reading or writing, in milliseconds.longThe number of bytes written to the disklongThe number of writes to the diskprotected voidsetDiskStats(long reads, long readBytes, long writes, long writeBytes, long currentQueueLength, long transferTime, long timeStamp) Sets the disk statistics.protected voidsetPartitionList(List<HWPartition> partitionList) Sets the partition list.toString()
-
Constructor Details
-
AixHWDiskStore
-
-
Method Details
-
updateAttributes
public boolean updateAttributes()Description copied from interface:HWDiskStoreMake a best effort to update all the statistics about the drive without needing to recreate the drive list. This method provides for more frequent periodic updates of individual drive statistics but may be less efficient to use if updating all drives. It will not detect if a removable drive has been removed and replaced by a different drive in between method calls.- Returns:
- True if the update was (probably) successful, false if the disk was not found
-
queryStats
Looks up this disk's per-disk stats from the subclass's perfstat data source.- Returns:
- stats POJO, or
nullif no entry was found for this disk name
-