How do I check drive temperature using Linux script?

265 pts.
Tags:
Linux
Linux servers
Server management
I'm monitoring the drive temperature is a critical feature of server management, to ensure that the hardware provides capable performance. If the drives temperature exceeds the safe threshold limit, it may result in the drive to crash. So I’ll be pleased if someone help me out how I check the drive temperature so that it should perform accurately.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Monitoring the drive temperature is a crucial aspect of server management, to ensure that the hardware delivers efficient performance. If the drives temperature exceeds the safe threshold limit, it may result in the drive to crash. Hence keeping a check on the temperature once a week (atleast) and monitoring its fluctuations can help bypass disasters.
To check the drive temperature, you must fire the following command as a root user:

smartctl -A /dev/hda

NOTE: In above command we have used hda due to the fact that the test server is configured with the “IDE controllers”, if your server is configured with the “SCSI controllers” device, replace the /dev/hda with the /dev/sda and Run the command.
Also make sure that you are using the individual partition label, for example.

smartctl -A /dev/hda1

OR

smartctl -A /dev/sda1

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Subhendu Sen
    You can install hddtemp a small tool that can help to do what you want. The source is here: http://download.savannah.gnu.org/releases/hddtemp/
    139,010 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: