From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 8 18:35:38 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19833106566B for ; Tue, 8 Dec 2009 18:35:38 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 9DB7F8FC16 for ; Tue, 8 Dec 2009 18:35:37 +0000 (UTC) Received: by bwz5 with SMTP id 5so4654449bwz.3 for ; Tue, 08 Dec 2009 10:35:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=J51LmRd/8doTzfT6664twWPhaFdIVT8ly6q9hSQwYnQ=; b=cZq28GL7RIy7GQ0S/Jjqyo7OwKNzGfWeZXXAqM0cepVXraiyFcoayMpvPd6dfBUN2b b7om0nv/f/lArSOIMsgoLZ9cB1/zxieCfQvKbpPcoR2kFJiI7+7B18ukTSyw4ESW0EN6 9YAdExNTo9s2E/c+JaWndyfxBkQyUW9FCMU10= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=xEWgcn5mKRlbk7puI93v97juHBVEEzIEw96eV4m2BKMW85ht1YQpBV8sERsU42TBEz aMgw45BZXZF7E+LKEgdC+vg+R2n+JYajWUkZdmrlMzfg5Y8uyvjEWhACGm/xei4p/GGg 78EOrQ6IG9/LOptAzdHT2pXu71wO1W45yAVd4= Received: by 10.204.150.77 with SMTP id x13mr1222063bkv.100.1260295805601; Tue, 08 Dec 2009 10:10:05 -0800 (PST) Received: from mbp-gige.totalterror.net (93-152-151-19.ddns.onlinedirect.bg [93.152.151.19]) by mx.google.com with ESMTPS id 19sm2585687fkr.18.2009.12.08.10.10.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 08 Dec 2009 10:10:04 -0800 (PST) From: Nikolay Denev Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Tue, 8 Dec 2009 20:10:02 +0200 Message-Id: <47D1BC12-848C-4C5B-9B4B-EFD6057B8B7B@gmail.com> To: freebsd-hackers@freebsd.org Mime-Version: 1.0 (Apple Message framework v1077) X-Mailer: Apple Mail (2.1077) X-Mailman-Approved-At: Tue, 08 Dec 2009 18:45:25 +0000 Subject: accessing geom stats from the kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 18:35:38 -0000 Hello, I have a small four SATA bay machine (HP ex470) which I'm using as a NAS = with FreeBSD+ZFS. It has four dual color leds for each SATA bay (red and blue + purple if = lit together) Which I'm controlling either from userspace by writing data to the = enclosure management ioport, or recently I've made a kernel module which uses the led(4) framework = and exports the leds as device nodes in /dev. What I'm wondering now is, if there is an easy way to access geom/disk = stats from in kernel and make the leds flash only during disk activity, without having to do it in userspace? =20 -- Regards, Nikolay Denev