Hi all,
I have built a very basic script to show me my HDD temperatures, and was wondering if it would be possible to have the HDD label displayed with the relevant device?
This is what I have at the moment:
Code:
#!/bin/sh
## This script has been created to enable quick HDD Temperature Monitoring.
##
## Usage: hddtmp
/usr/sbin/hddtemp /dev/hda
/usr/sbin/hddtemp /dev/hdb
/usr/sbin/hddtemp /dev/hdc
/usr/sbin/hddtemp /dev/sda
/usr/sbin/hddtemp /dev/sdb
And this is what it displays:
Quote:
root@Black:/# hddtmp
/dev/hda: ST3200820A: 43°C
/dev/hdb: Maxtor 6Y120L0: 34°C
/dev/hdc: ST3200820A: 47°C
/dev/sda: SAMSUNG HD080HJ: 36°C
/dev/sdb: ST3160815AS: 46°C
|
What I would like to do now is to add a label to each corresponding drive, so that it is easier to remember what each temp refers to ...
This following code doesn't work, this is only an example of what I am trying to do; but maybe someone could give me some pointers please:
Code:
#!/bin/sh
echo ISOs | /usr/sbin/hddtemp /dev/hda | alias ISOs
echo Movies | /usr/sbin/hddtemp /dev/hdb | alias Movies
echo Storage | /usr/sbin/hddtemp /dev/hdc | alias Storage
echo Linux | /usr/sbin/hddtemp /dev/sda | alias Linux
echo Other | /usr/sbin/hddtemp /dev/sdb | alias Other
What I am aiming at as a final product would be something displayed like this:
Quote:
ISOs : 43°C : (hda)
Movies : 34°C : (hdb)
Storage : 47°C : (hdc)
Linux : 36°C : (sda)
Other : 46°C : (sdb)
|
Thanks very much in advance for any assistance.
Cheers