return 1
fi
- ssh -qn $HOSTNAME <<EOF
+ ssh -q $HOSTNAME <<EOF
while [ 1 ]; do
df=`df --output=pcent "$DRIVE" | tail -1 | sed 's/[^0-9]//g'`
ts=`date '+%s'`
- stdbuf -o0 echo "\$ts|$HOSTNAME|DISK-$LABEL-USED|\$df" >> $OUTPATH
+ stdbuf -o0 echo "\$ts|$HOSTNAME|DISK-$LABEL-USED|\$df"
sleep $DELAY
- done &
+ done >> $OUTPATH &
+ echo \$! >/home/bdsm/.df.pid
EOF
- ssh -q $HOSTNAME "ps aux | \
- grep bdsm | \
- grep df | \
- grep -v grep | \
- awk '{print \$2}' \
- > /home/bdsm/.df.pid &"
else
echo "Already Running"
fi
return 1
fi
- ssh -qn $HOSTNAME <<EOF
+ ssh -q $HOSTNAME <<EOF
while [ 1 ]; do
ts=`date '+%s'`
stdbuf -o0 sensors | \
} line=line+1
}' | tr ':' '|'
sleep $DELAY
- done &
+ done >> $OUTPATH &
+ echo \$! > /home/bdsm/.sensors.pid
EOF
- ssh -q $HOSTNAME "ps aux | \
- grep bdsm | \
- grep sensors | \
- grep -v grep | \
- awk '{print \$2}' \
- > /home/bdsm/.sensors.pid &"
else
echo "Already Running"
fi