NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

When does total count overflow with iostat -I



Hi, I'm trying to come up with a shell script that is periodically run
from cron. It compares the output from 'iostat -ID' and if there was no
disk activity in the past N minutes, it runs 'scsictl /dev/sd0 stop' to
turn off hard disk.

$ iostat -ID sd0 sd1
              sd0               sd1
    KB   xfr time     KB   xfr time
 34192  3905 988.50  68454  4720 12.76

First question is - the output from the iostat above shows the total
number of KB transfered for disks since the system booted. When will
this value eventually overflow? If it uses a 64-bit datatype to store
the number, maybe I should not even bother checking for overflow?

Second question - is it safe to run 'scsictl /dev/sd0 stop' on the disk
that contains root filesystem, etc. I did a few test runs, and it looks
like the driver automatically restarts the disk if a process is trying
to access it.


Home | Main Index | Thread Index | Old Index