11

Specifically, in smartctl output, how is LifeTime(hours) calculated? I'm assuming it's one of the following:

  1. The difference (in hours) between the time of the test and the manufacture date of the drive.

  2. The difference (in hours) between the time of the test and the first powered-on date of the drive.

  3. The difference (in hours) between the time of the test (in terms of "drive running hours") and the total number of "drive running hours".

*By "drive running hours", I mean a running total of the number of hours a drive has been powered on. (Analogy: Airplane engines don't have odometers like cars. Rather, they usually show the number of hours the engines have been running. I'm using "drive running hours" to mean something similar, but for hard drives)


Example smartctl output:

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     22057         -
# 2  Short offline       Completed without error       00%     22057         -
# 3  Extended offline    Completed without error       00%     22029         -
# 4  Extended offline    Completed without error       00%     21958         -
1
  • Note: The manpage (IMHO) doesn't seem to be very clear by what powered-on hours actually means.
    – rinogo
    Jan 6 '15 at 23:35
9

If I remember correctly this can vary from drive to drive.

Most brands: Once testing is done at the manufacturer the firmware is loaded which will begin monitoring the first time the drive is started by the user.

The firmware does not monitor actual times. It works exactly like the hour meter on a plane. The only difference being some brands might do testing with the firmware active, so a brand new drive might show 1-2 hours where others will show 0 (Unless the test takes over an hour.)

If you run smartctl -A /dev/sdX, replacing x with your drive, you can see the attributes that your HDD is reporting. There is a Powered On Time attribute which is where this value comes from.

2
  • So, if I'm understanding correctly, you're saying that 1. it definitely is the "powered on time" (airplane engine-style accounting) and 2. this value can vary by a couple of hours at most, depending on testing in the early life of the drive. Is that correct?
    – rinogo
    Jan 7 '15 at 22:18
  • 1
    Yes both are correct.
    – JpaytonWPD
    Jan 7 '15 at 23:05
0

It is the same as Power_On_Hours, but the values may differ on some drives. For example I have two drives where LifeTime is a uint16 and rolls over after 65535 hours.

sudo smartctl -A -l selftest /dev/sda | egrep '(Power_On|# 1)'
  9 Power_On_Hours          0x0032   022   022   000    Old_age   Always       -       68380
# 1  Extended offline    Self-test routine in progress 80%      2844         -

65535+2844 = 68379

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.