![]() |
![]() |
![]() |
UDisks Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Properties |
org.freedesktop.UDisks2.Drive.Ataorg.freedesktop.UDisks2.Drive.Ata — Disk drive using the ATA command-set |
SmartUpdate (IN a{sv} options); SmartGetAttributes (IN a{sv} options, OUT a(ysqiiixia{sv}) attributes); SmartSelftestStart (IN s type, IN a{sv} options); SmartSelftestAbort (IN a{sv} options);
SmartSupported readable b SmartEnabled readable b SmartUpdated readable t SmartFailing readable b SmartPowerOnSeconds readable t SmartTemperature readable d SmartNumAttributesFailing readable i SmartNumAttributesFailedInThePast readable i SmartNumBadSectors readable x SmartSelftestStatus readable s SmartSelftestPercentRemaining readable i
Objects implementing this interface also implement the org.freedesktop.UDisks2.Drive interface.
SmartUpdate (IN a{sv} options);
Reads SMART data from the drive and update relevant properties.
If the option nowakeup
is given and the disk is in a sleeping
state, the error
org.freedesktop.UDisks2.Error.WouldWakeup
is
returned.
The option atasmart_blob
can be used to inject libatasmart
compatible blobs for testing how clients react to different
kinds of SMART data. Only uid 0 may use this. This option may
be removed in the future with it being considered an ABI break
- it only exists for testing purposes. Example:
# export ATA_SMART_BLOB=/usr/share/doc/libatasmart-devel-0.17/Maxtor_96147H8--BAC51KJ0--2 ; \ gdbus call --system --dest org.freedesktop.UDisks2 \ --object-path /org/freedesktop/UDisks2/drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30039835 \ --method org.freedesktop.UDisks2.Drive.Ata.SmartUpdate \ "{'atasmart_blob': <'$ATA_SMART_BLOB'>}"
|
Options - known options (in addition to standard options) includes |
SmartGetAttributes (IN a{sv} options, OUT a(ysqiiixia{sv}) attributes);
Get the SMART attributes. Each attribute is a struct with the following members:
id (type 'y') |
Attribute Identifier |
name (type 's') |
The identifier as a string. |
flags (type 'q') |
16-bit attribute flags (bit 0 is prefail/oldage, bit 1 is online/offline). |
value (type 'i') |
The current value or -1 if unknown. |
worst (type 'i') |
The worst value of -1 if unknown. |
threshold (type 'i') |
The threshold or -1 if unknown. |
pretty (type 'x') |
An interpretation of the value - must be ignored if |
pretty_unit (type 'i') |
The unit of the |
expansion (type 'a{sv}') |
Currently unused. Intended for future expansion. |
The name
parameter should be used as the authoritative identifier for the attribute since it is derived from the numerical id
and the disk's IDENTIFY
data and thus handles ID collisions between drives of different make and model.
|
Options - known options (in addition to standard options) includes |
|
The SMART attributes. |
SmartSelftestStart (IN s type, IN a{sv} options);
Starts a SMART selftest. The type
parameter is for the type
of test to start - valid values are short
,
extended
and conveyance
.
Note that the method returns immediately after the test has been started successfully.
|
The type test to run. |
|
Options (currently unused except for standard options). |
SmartSelftestAbort (IN a{sv} options);
Aborts a running SMART selftest.
|
Options (currently unused except for standard options). |
SmartUpdated readable t
The point in time (seconds since the Unix Epoch) that the SMART status was updated or 0 if never updated.
The value of the other properties related to SMART are not meaningful if this proeprty is 0.
SmartFailing readable b
Set to TRUE
if disk is about to fail.
This value is read from the disk itself and does not include any interpretation.
SmartPowerOnSeconds readable t
The amount of time the disk has been powered on (according to SMART data) or 0 if unknown.
SmartTemperature readable d
The temperature (in Kelvin) of the disk according to SMART data or 0 if unknown.
SmartNumAttributesFailing readable i
The number of attributes failing right now or -1 if unknown.
SmartNumAttributesFailedInThePast readable i
The number of attributes that have failed in the past or -1 if unknown.
SmartNumBadSectors readable x
The number of bad sectors (ie. pending and reallocated) or -1 if unknown.
SmartSelftestStatus readable s
The status of the last self-test. Known values include
success |
Last self-test was a success (or never ran). |
aborted |
Last self-test was aborted. |
interrupted |
Last self-test was interrupted. |
fatal |
Last self-test did not complete. |
error_unknown |
Last self-test failed (Unknown). |
error_electrical |
Last self-test failed (Electrical). |
error_servo |
Last self-test failed (Servo). |
error_read |
Last self-test failed (Read). |
error_handling |
Last self-test failed (Damage). |
inprogress |
Self-test is currently in progress. |