From owner-freebsd-arch@FreeBSD.ORG Fri Jul 13 15:48:34 2007 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF04016A404; Fri, 13 Jul 2007 15:48:34 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from mojo.ru (mojo.ru [84.252.152.63]) by mx1.freebsd.org (Postfix) with ESMTP id 4115C13C4A8; Fri, 13 Jul 2007 15:48:31 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from [192.168.0.16] (nc-76-4-28-21.dhcp.embarqhsd.net [76.4.28.21]) (authenticated bits=0) by mojo.ru (8.12.11.20060308/8.12.10) with ESMTP id l6DFmPRp003137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Jul 2007 19:48:28 +0400 Message-ID: <46979EC3.20803@FreeBSD.org> Date: Fri, 13 Jul 2007 11:48:19 -0400 From: "Constantine A. Murenin" Organization: Google Summer of Code 2007 Student @ The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041217 X-Accept-Language: en-gb, en-gb-oed, en, en-us, ru, ru-ru, ru-su MIME-Version: 1.0 To: John Baldwin References: <55754.1184143579@critter.freebsd.dk> <200707111145.27741.jhb@freebsd.org> <20070712090008.yc6d6zptwkow04oc@webmail.leidinger.net> <200707121404.34168.jhb@freebsd.org> In-Reply-To: <200707121404.34168.jhb@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Rui Paulo , Poul-Henning Kamp , "Constantine A. Murenin" , Shteryana Shopova , Robert Watson , freebsd-arch@FreeBSD.org, Alexander Leidinger Subject: Re: Porting OpenBSD's sysctl hw.sensors framework to FreeBSD X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2007 15:48:35 -0000 On 12/07/2007 14:04, John Baldwin wrote: > On Thursday 12 July 2007 03:00:08 am Alexander Leidinger wrote: > >>Quoting John Baldwin (from Wed, 11 Jul 2007 > > 11:45:26 -0400): > >>>On Wednesday 11 July 2007 07:49:59 am Alexander Leidinger wrote: >> >>>>On the other hand you don't want to allow an userland tool to directly >>>>mess around with the registers on your RAID or NIC to get some status... >>> >>>Err, that's how all the RAID utilities I've used work. They send firmware >>>commands from userland and parse the replies in userland. One exception > > I've > >>That's sad... they should provide this functionality in the driver >>instead, it would allow to use access restrictions for some parts. > > > Not really, it avoids having to duplicate a lot of work in drivers that can be > written once in a cross-platform userland utility. Drivers aren't really the > place to be monitoring raid status sending pages, e-mails, etc. It's best to > let userland invoke sendmail, not the kernel. :) John, I'm sorry to disappoint you, but RAID drivers in OpenBSD don't implement SMTP and don't do emails, they only provide updates to the sensors framework when there are some changes in the state of the drive. :) sensorsd(8) is used to send alerts and emails based on the information from the sensors framework, and user configuration. bioctl(8) is used to configure RAID for _all drivers_. There are no separate utilities for RAID configuration based on brand-name, just like nowadays there are no separate utilities for configuring Ethernet adapters. [0] To my knowledge, this RAID drive status monitoring functionality was already ported to NetBSD's envsys/sysmon a short while ago -- on 2007-05-01. It appears in OpenBSD since 2005-11-30 and is appraised by many users and developers worldwide. This project that I am working on is about porting the generic sensors framework that is used by RAID drives amongst other devices. The amount of work or bookkeeping that is done in the device drivers to provide sensors to this framework is very minimal. Types of sensors in the framework are very well defined. This sensors framework, by itself, provides only general status reporting in regards to RAID drives [1] -- bioctl(8) does most of the things in regards to RAID, and it goes separately from the sensors framework. Cheers, Constantine. [0]http://marc.info/?l=openbsd-tech&m=113772381621199&w=2 [1]http://opengrok.creo.hu/openbsd/xref/src/sys/sys/sensors.h#SENSOR_DRIVE_EMPTY