Class LinuxHWDiskStore
java.lang.Object
oshi.hardware.common.AbstractHWDiskStore
oshi.hardware.platform.linux.LinuxHWDiskStore
- All Implemented Interfaces:
HWDiskStore
- Direct Known Subclasses:
LinuxHWDiskStoreJNA
Linux hard disk implementation.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final intprotected static final Stringprotected static final Stringprotected static final intprotected static final int[] -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLinuxHWDiskStore(String name, String model, String serial, long size) -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidcomputeDiskStats(LinuxHWDiskStore store, String devstat) protected static voidfinalizePartitions(List<HWDiskStore> result) longThe length of the disk queue (#I/O's in progress).protected static Stringprotected static StringgetMountPointOfDmDevice(String vgName, String lvName) protected List<HWPartition> protected static StringgetPartitionNameForDmDevice(String vgName, String lvName) The partitions on this disk.longThe number of bytes read from the disklonggetReads()The number of reads from 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) protected voidsetPartitionList(List<HWPartition> partitionList) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface HWDiskStore
updateAttributes
-
Field Details
-
BLOCK
- See Also:
-
DISK
- See Also:
-
PARTITION
- See Also:
-
STAT
- See Also:
-
SIZE
- See Also:
-
MINOR
- See Also:
-
MAJOR
- See Also:
-
ID_FS_TYPE
- See Also:
-
ID_FS_UUID
- See Also:
-
ID_FS_LABEL
- See Also:
-
ID_MODEL
- See Also:
-
ID_SERIAL_SHORT
- See Also:
-
DM_UUID
- See Also:
-
DM_VG_NAME
- See Also:
-
DM_LV_NAME
- See Also:
-
LOGICAL_VOLUME_GROUP
- See Also:
-
SECTORSIZE
protected static final int SECTORSIZE- See Also:
-
UDEV_STAT_ORDERS
protected static final int[] UDEV_STAT_ORDERS -
UDEV_STAT_LENGTH
protected static final int UDEV_STAT_LENGTH
-
-
Constructor Details
-
LinuxHWDiskStore
-
-
Method Details
-
getReads
public long getReads()Description copied from interface:HWDiskStoreThe number of reads from the disk- Returns:
- the reads
-
getReadBytes
public long getReadBytes()Description copied from interface:HWDiskStoreThe number of bytes read from the disk- Returns:
- the bytes read
-
getWrites
public long getWrites()Description copied from interface:HWDiskStoreThe number of writes to the disk- Returns:
- the writes
-
getWriteBytes
public long getWriteBytes()Description copied from interface:HWDiskStoreThe number of bytes written to the disk- Returns:
- the bytes written
-
getCurrentQueueLength
public long getCurrentQueueLength()Description copied from interface:HWDiskStoreThe length of the disk queue (#I/O's in progress). Includes I/O requests that have been issued to the device driver but have not yet completed. Not supported on macOS.- Returns:
- the current disk queue length
-
getTransferTime
public long getTransferTime()Description copied from interface:HWDiskStoreThe time spent reading or writing, in milliseconds.- Returns:
- the transfer time
-
getTimeStamp
public long getTimeStamp()Description copied from interface:HWDiskStoreThe time this disk's statistics were updated.- Returns:
- the timeStamp, in milliseconds since the epoch.
-
getPartitions
Description copied from interface:HWDiskStoreThe partitions on this disk.- Returns:
- an
UnmodifiableListof the partitions on this drive.
-
setDiskStats
protected void setDiskStats(long reads, long readBytes, long writes, long writeBytes, long currentQueueLength, long transferTime, long timeStamp) -
setPartitionList
-
getMutablePartitionList
-
computeDiskStats
-
readMountsMap
-
getPartitionNameForDmDevice
-
getMountPointOfDmDevice
-
getDependentNamesFromHoldersDirectory
-
finalizePartitions
-