[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-users
Subject:    When does total count overflow with iostat -I
From:       raymond.meyer () rambler ! ru
Date:       2009-02-10 18:52:11
Message-ID: 20090210185211.dd7ec9df.raymond.meyer () rambler ! ru
[Download RAW message or body]

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.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic