blob: 1b37d54b16abd2c5a6af805d10ab439e858ccf2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/zsh
. /home/pks/bin/func.zsh
check_root
MAX_TEMP=$1
for i in `ls -1 /dev/disk/by-id/ | grep -v -P "^wwn-|\-part\d$|md-name|md-uuid"`; do
DRIVE="/dev/disk/by-id/$i"
TEMP=$(/usr/sbin/hddtemp -n $DRIVE 2>/dev/null)
if [ "$TEMP" != "" ]; then
if [ $TEMP -gt $MAX_TEMP ]; then logger "$DRIVE temp at $TEMP"; fi
fi
done
|