[root@gawa tmp]# rpm -ivh hddtemp-0.3-0.beta8.2mdk.ppc.rpm 準備中... ########################################### [100%] 1:hddtemp ########################################### [100%] [root@gawa tmp]#
[root@gawa tmp]# hddtemp /dev/hda WARNING: Drive /dev/hda doesn't appear in the database of supported drives WARNING: But using a common value, it reports something. WARNING: Note that the temperature shown could be wrong. WARNING: See --help, --debug and --drivebase options. WARNING: And don't forget you can add your drive to hddtemp.db /dev/hda: Maxtor 6L300R0: 28°C or °F [root@gawa tmp]#/etc/hddtemp.db へ 6L300R0 を追加する。
[root@gawa tmp]# cd /etc [root@gawa etc]# mv hddtemp.db hddtemp.db.orig [root@gawa etc]# cp hddtemp.db.orig hddtemp.db [root@gawa etc]# vi hddtemp.db : : [root@gawa etc]# diff -c hddtemp.db.orig hddtemp.db *** hddtemp.db.orig 2003-09-04 19:03:49.000000000 +0900 --- hddtemp.db 2005-12-26 17:47:25.000000000 +0900 *************** *** 128,133 **** --- 128,134 ---- "MAXTOR 6L0[2468]0[LJ][1234]" 194 C "Maxtor DiamondMax Plus D740X family" "Maxtor 6Y(06|08|12|16|20)0[LPM]0" 194 C "Maxtor DiamondMax Plus 9" "Maxtor 94098U8" 11 C "Maxtor DiamondMax 40 94098U8" + "Maxtor 6L300R0" 194 C "Maxtor 6L300R0"これで(たぶん)正しく温度を表示する。
[root@gawa etc]# hddtemp /dev/hda /dev/hda: Maxtor 6L300R0: 29°C [root@gawa etc]#
#!/bin/sh TEMPLIMIT=45 LOCKFILE=/tmp/HDDtemp if [ -f $LOCKFILE ] then echo $0 already running exit 1 fi TEMP=`/usr/sbin/hddtemp -n /dev/hda` date echo $TEMP C SLP=`echo $TEMP | sed -e 's/^[0-9][0-9]*$//'` if [ "$SLP" != "" ] then echo sleep exit 0 fi if [ "$TEMP" -le $TEMPLIMIT ] then /bin/echo -n '\\\\' > /dev/ttyS1 exit 0 fi /bin/echo -n ']]]]' > /dev/ttyS1 touch $LOCKFILE while [ 1 ] do TEMP=`/usr/sbin/hddtemp -n /dev/hda` date echo $TEMP C SLP=`echo $TEMP | sed -e 's/^[0-9][0-9]*$//'` if [ "$SLP" != "" ] then echo sleep exit 0 fi if [ "$TEMP" -le $TEMPLIMIT ] then break fi sleep 60 done /bin/echo -n '\\\\' > /dev/ttyS1 rm $LOCKFILE exit 0
[root@gawa etc]# /bin/sh /usr/local/sbin/HDDtemp 2005年 12月 26日 月曜日 17:52:37 JST 30 C [root@gawa etc]#
[root@gawa etc]# crontab -e : ~ ~ "/tmp/crontab.672" 2 lines, 149 characters [E] crontab: installing new crontab [root@gawa etc]# crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.672 installed on Mon Dec 26 17:52:07 2005) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) 10 4 * * * nice /bin/sh /usr/local/sbin/Backup 2>/dev/null 1> /dev/null 10,25,40,55 * * * * nice /bin/sh /usr/local/sbin/HDDtemp >> /tmp/HDDtemp.log [root@gawa etc]#
← HS-DGL! + ハックキット 2.0:バックアップ(2) |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ HS-DGL! + ハックキット 2.0:ファイルサーバ |