Is there a program which can display the power on hours of a hard disk from a *nix shell? I'm rewriting a server benchmark program, and this would be a useful value to compare.
1 Answer
smartctl from the smartmontools package can display this information, provided the OS has "raw" access to the device. If you are using a hardware RAID, this information is typically not available without array-specific drivers and userland tools.
I'll leave it as an exercise for the reader to employ standard unix text processing tools to filter out the information you need.
- Running it on my drive brings up
Device does not support SMARTJoel G Mathew– Joel G Mathew2013-10-20 03:55:48 +00:00Commented Oct 20, 2013 at 3:55 - What type of drive is this and how is it connected to your system?EEAA– EEAA2013-10-20 03:59:02 +00:00Commented Oct 20, 2013 at 3:59
- If you have a RAID controller you can try MegaCLIdeagh– deagh2013-10-20 06:16:05 +00:00Commented Oct 20, 2013 at 6:16
- It is 2x 1TB SATA2 drives connected to PERC H200 hardware RAID 1. It is part of a leased dedicated server.Joel G Mathew– Joel G Mathew2013-10-20 08:40:29 +00:00Commented Oct 20, 2013 at 8:40
- PERC H200 is from DELL so you can use their OMSA tools linux.dell.com/wiki/index.php/Repository/OMSAdeagh– deagh2013-10-20 10:01:14 +00:00Commented Oct 20, 2013 at 10:01