#!/bin/sh | |
. /etc/utils.sh | |
sata_blkdev=$(find_sata_blkdev) | |
sata_dev=${sata_blkdev#/dev/} | |
if [ -e /sys/block/${sata_dev}/stat ]; then | |
interval=$1 | |
if [ -z "$interval" ]; then | |
interval=15 | |
fi | |
while :; do | |
read line </sys/block/${sata_dev}/stat | |
echo "$line" | |
sleep "$interval" | |
done | |
else | |
while :; do sleep 1000000; done | |
fi |