404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.145.82.96: ~ $
#!/bin/sh

interval=300
tmpdir="/tmp/results"
drive="/dev/hda"

if [ ! -d "$tmpdir" ] ; then
  echo "no such dir: $tmpdir"
  exit 1
fi

logger -s -t hddtemp "starting hddtemp monitor: interval=$interval, tmpdir=$tmpdir, drive=$drive"
stamp=`date +%s`
tmpfile_old="$tmpdir/hddtemp-$stamp"
hddtemp $drive --debug > "$tmpfile_old"

while [ 1 ] ; do
  sleep $interval
  stamp=`date +%s`
  tmpfile_new="$tmpdir/hddtemp-$stamp"
  hddtemp $drive --debug > "$tmpfile_new"
  RETURNED=`diff "$tmpfile_old" "$tmpfile_new"`
  if [ -n "$RETURNED" ] ; then
    logger -s -t hddtemp "change $tmpfile_new !!!"
    tmpfile_old="$tmpfile_new"
  else
    logger -s -t hddtemp "no change"
    rm "$tmpfile_new"
  fi
done

Filemanager

Name Type Size Permission Actions
graph-field.sh File 792 B 0644
hddtemp_monitor.sh File 701 B 0644
plot-field.pl File 1.22 KB 0644