How to get total running time of a hard disk











up vote
6
down vote

favorite
1












In order to do disk rotation in a server, I need to know the current running time (online) time of a disk on a Linux CentOS release 6.3 (Final) system.



The disks are connected with SATA (e.g. /dev/sdc), are simple rotating type (Western Digital RE type disks), and are not organized in any RAID or similar.



I have tried to find it using smartctrl (as suggested in superuser.com/questions/279412), but was unable to find the information. Any suggestion for command ?










share|improve this question




















  • 2




    What do you mean you get no luck when running smartctrl? Do you get errors or what? How are the disks physically connected? Do you have a hardware RAID controller? You might not have an easy way to access any data with harware RAID. You really need to provide more details.
    – Zoredache
    Dec 10 '13 at 20:39








  • 1




    So what output do you get for smartctl --all /dev/sdc? You should see a section labeled Vendor Specific SMART Attributes with Thresholds. Do you see any values there? What exactly did you get?
    – Zoredache
    Dec 10 '13 at 20:54










  • Yes, thanks, found it, I assume it is "Power_On_Hours". Will update the post with result.
    – Morten Zilmer
    Dec 10 '13 at 20:58















up vote
6
down vote

favorite
1












In order to do disk rotation in a server, I need to know the current running time (online) time of a disk on a Linux CentOS release 6.3 (Final) system.



The disks are connected with SATA (e.g. /dev/sdc), are simple rotating type (Western Digital RE type disks), and are not organized in any RAID or similar.



I have tried to find it using smartctrl (as suggested in superuser.com/questions/279412), but was unable to find the information. Any suggestion for command ?










share|improve this question




















  • 2




    What do you mean you get no luck when running smartctrl? Do you get errors or what? How are the disks physically connected? Do you have a hardware RAID controller? You might not have an easy way to access any data with harware RAID. You really need to provide more details.
    – Zoredache
    Dec 10 '13 at 20:39








  • 1




    So what output do you get for smartctl --all /dev/sdc? You should see a section labeled Vendor Specific SMART Attributes with Thresholds. Do you see any values there? What exactly did you get?
    – Zoredache
    Dec 10 '13 at 20:54










  • Yes, thanks, found it, I assume it is "Power_On_Hours". Will update the post with result.
    – Morten Zilmer
    Dec 10 '13 at 20:58













up vote
6
down vote

favorite
1









up vote
6
down vote

favorite
1






1





In order to do disk rotation in a server, I need to know the current running time (online) time of a disk on a Linux CentOS release 6.3 (Final) system.



The disks are connected with SATA (e.g. /dev/sdc), are simple rotating type (Western Digital RE type disks), and are not organized in any RAID or similar.



I have tried to find it using smartctrl (as suggested in superuser.com/questions/279412), but was unable to find the information. Any suggestion for command ?










share|improve this question















In order to do disk rotation in a server, I need to know the current running time (online) time of a disk on a Linux CentOS release 6.3 (Final) system.



The disks are connected with SATA (e.g. /dev/sdc), are simple rotating type (Western Digital RE type disks), and are not organized in any RAID or similar.



I have tried to find it using smartctrl (as suggested in superuser.com/questions/279412), but was unable to find the information. Any suggestion for command ?







linux hard-drive centos






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 10 '13 at 20:58

























asked Dec 10 '13 at 20:37









Morten Zilmer

2931211




2931211








  • 2




    What do you mean you get no luck when running smartctrl? Do you get errors or what? How are the disks physically connected? Do you have a hardware RAID controller? You might not have an easy way to access any data with harware RAID. You really need to provide more details.
    – Zoredache
    Dec 10 '13 at 20:39








  • 1




    So what output do you get for smartctl --all /dev/sdc? You should see a section labeled Vendor Specific SMART Attributes with Thresholds. Do you see any values there? What exactly did you get?
    – Zoredache
    Dec 10 '13 at 20:54










  • Yes, thanks, found it, I assume it is "Power_On_Hours". Will update the post with result.
    – Morten Zilmer
    Dec 10 '13 at 20:58














  • 2




    What do you mean you get no luck when running smartctrl? Do you get errors or what? How are the disks physically connected? Do you have a hardware RAID controller? You might not have an easy way to access any data with harware RAID. You really need to provide more details.
    – Zoredache
    Dec 10 '13 at 20:39








  • 1




    So what output do you get for smartctl --all /dev/sdc? You should see a section labeled Vendor Specific SMART Attributes with Thresholds. Do you see any values there? What exactly did you get?
    – Zoredache
    Dec 10 '13 at 20:54










  • Yes, thanks, found it, I assume it is "Power_On_Hours". Will update the post with result.
    – Morten Zilmer
    Dec 10 '13 at 20:58








2




2




What do you mean you get no luck when running smartctrl? Do you get errors or what? How are the disks physically connected? Do you have a hardware RAID controller? You might not have an easy way to access any data with harware RAID. You really need to provide more details.
– Zoredache
Dec 10 '13 at 20:39






What do you mean you get no luck when running smartctrl? Do you get errors or what? How are the disks physically connected? Do you have a hardware RAID controller? You might not have an easy way to access any data with harware RAID. You really need to provide more details.
– Zoredache
Dec 10 '13 at 20:39






1




1




So what output do you get for smartctl --all /dev/sdc? You should see a section labeled Vendor Specific SMART Attributes with Thresholds. Do you see any values there? What exactly did you get?
– Zoredache
Dec 10 '13 at 20:54




So what output do you get for smartctl --all /dev/sdc? You should see a section labeled Vendor Specific SMART Attributes with Thresholds. Do you see any values there? What exactly did you get?
– Zoredache
Dec 10 '13 at 20:54












Yes, thanks, found it, I assume it is "Power_On_Hours". Will update the post with result.
– Morten Zilmer
Dec 10 '13 at 20:58




Yes, thanks, found it, I assume it is "Power_On_Hours". Will update the post with result.
– Morten Zilmer
Dec 10 '13 at 20:58










1 Answer
1






active

oldest

votes

















up vote
14
down vote



accepted










Answer based on comments from @Zoredache:



Command is smartctl --all /dev/sdc and the section to look under is "Vendor Specific SMART Attributes with Thresholds", which has an attribute named "Power_On_Hours".



So command for just getting power on hours (runnning) is:



smartctl --all /dev/sdc | grep Power_On_Hours


Which can then show something like:



9 Power_On_Hours          0x0032   087   087   000    Old_age   Always       -       10171


The running time is thus: 10171 hours






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f686570%2fhow-to-get-total-running-time-of-a-hard-disk%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    14
    down vote



    accepted










    Answer based on comments from @Zoredache:



    Command is smartctl --all /dev/sdc and the section to look under is "Vendor Specific SMART Attributes with Thresholds", which has an attribute named "Power_On_Hours".



    So command for just getting power on hours (runnning) is:



    smartctl --all /dev/sdc | grep Power_On_Hours


    Which can then show something like:



    9 Power_On_Hours          0x0032   087   087   000    Old_age   Always       -       10171


    The running time is thus: 10171 hours






    share|improve this answer

























      up vote
      14
      down vote



      accepted










      Answer based on comments from @Zoredache:



      Command is smartctl --all /dev/sdc and the section to look under is "Vendor Specific SMART Attributes with Thresholds", which has an attribute named "Power_On_Hours".



      So command for just getting power on hours (runnning) is:



      smartctl --all /dev/sdc | grep Power_On_Hours


      Which can then show something like:



      9 Power_On_Hours          0x0032   087   087   000    Old_age   Always       -       10171


      The running time is thus: 10171 hours






      share|improve this answer























        up vote
        14
        down vote



        accepted







        up vote
        14
        down vote



        accepted






        Answer based on comments from @Zoredache:



        Command is smartctl --all /dev/sdc and the section to look under is "Vendor Specific SMART Attributes with Thresholds", which has an attribute named "Power_On_Hours".



        So command for just getting power on hours (runnning) is:



        smartctl --all /dev/sdc | grep Power_On_Hours


        Which can then show something like:



        9 Power_On_Hours          0x0032   087   087   000    Old_age   Always       -       10171


        The running time is thus: 10171 hours






        share|improve this answer












        Answer based on comments from @Zoredache:



        Command is smartctl --all /dev/sdc and the section to look under is "Vendor Specific SMART Attributes with Thresholds", which has an attribute named "Power_On_Hours".



        So command for just getting power on hours (runnning) is:



        smartctl --all /dev/sdc | grep Power_On_Hours


        Which can then show something like:



        9 Power_On_Hours          0x0032   087   087   000    Old_age   Always       -       10171


        The running time is thus: 10171 hours







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 10 '13 at 21:02









        Morten Zilmer

        2931211




        2931211






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f686570%2fhow-to-get-total-running-time-of-a-hard-disk%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How do I know what Microsoft account the skydrive app is syncing to?

            Grease: Live!

            When does type information flow backwards in C++?