On Sun, Jul 30, 2006 at 03:03:26AM +0200, Wijnand Wiersma wrote:
> 2006/7/29, andrew fresh <[EMAIL PROTECTED]>:
> >One thing I ran into is that bioctl needs to run as root to get access
> >to /dev/bio, even for read only access.  Is there a way to query bioctl
> >without needing root?
> 
> Well, I think you only need the status of the drives and that is
> availlable using sysctl hw.sensors in current (you already mentioned
> sysctl). A monitoring system should not use the capabilities of
> bioctl, it just needs to know the status and report that.

If that is the case, then this check will become obsolete.  That would
be nice!  I will have to go put -current on my test box and try it out.  


As it is, on my 3.9-stable box, the output from sysctl if it is
available does not seem very reliable:

hw.sensors.29=esm0, Drive 0, drive, online
hw.sensors.30=esm0, Drive 1, drive, online
hw.sensors.31=esm0, Drive 2, drive, unknown
hw.sensors.32=esm0, Drive 3, drive, unknown
hw.sensors.33=esm0, Drive 4, drive, online
hw.sensors.34=esm0, Drive 5, drive, online
hw.sensors.35=esm0, Drive 6, drive, unknown
hw.sensors.36=esm0, Drive 7, drive, unknown

$ sudo bioctl ami0
Password:
Volume  Status     Size           Device
 ami0 0 Online         8984199168 sd0     RAID1
      0 Online         8984199168 0:0.0   safte0 <IBM     DRVS09D 0140>
      1 Online         8984199168 0:1.0   safte0 <IBM     DRVS09D 0140>
 ami0 1 Online        36234592256 sd1     RAID10
      0 Online        18117296128 0:3.0   safte0 <QUANTUM ATLAS10K2-TY184JDA40>
      1 Online        18117296128 0:4.0   safte0 <QUANTUM ATLAS10K2-TY184JDA40>
      2 Online        18117296128 0:5.0   safte0 <QUANTUM ATLAS10K2-TY184JDA40>
      3 Online        18117296128 0:8.0   safte0 <QUANTUM ATLAS10K2-TY184JDA40>
 ami0 2 Hot spare      8984199168 0:2.0   safte0 <IBM     DMVS09M 0220>
 ami0 3 Hot spare     18117296128 0:9.0   safte0 <QUANTUM ATLAS 10K 18SCA UCHD>


The rest of the sensors seem mostly correct though, and there are sure
enough of them!

$ sysctl hw.sensors | tail -1
hw.sensors.99=safte0, temp1, OK, temp, 27.78 degC / 82.00 degF


Also, on another box that has external disk box connected with ses, I
don't get any status for those disks in sysctl.  The disks that are
actually in the server are using safte and those show up in sysctl.  I
don't know why, so now I have this check :-)


> Now that I think of it, I should add support to the upwatch monitoring
> system too, but I am not that lucky to have hardware to actually test
> it :-)

If the information is available in sysctl in 4.0, that would be the
check to integrate.

l8rZ,
-- 
andrew - ICQ# 253198 - JID: [EMAIL PROTECTED]

BOFH excuse of the day: dynamic software linking table corrupted

Reply via email to