From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 9 20:23:06 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C364216A400 for ; Mon, 9 Apr 2007 20:23:06 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (keira.kiwi-computer.com [63.224.10.3]) by mx1.freebsd.org (Postfix) with SMTP id 5001513C4C5 for ; Mon, 9 Apr 2007 20:23:06 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 87929 invoked by uid 2001); 9 Apr 2007 19:56:24 -0000 Date: Mon, 9 Apr 2007 14:56:24 -0500 From: "Rick C. Petty" To: Garrett Cooper Message-ID: <20070409195624.GA87746@keira.kiwi-computer.com> References: <46192EFC.6030906@u.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46192EFC.6030906@u.washington.edu> User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org Subject: Re: Discovering list of open files from "kernel level" without using utils like lsof X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd@kiwi-computer.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Apr 2007 20:23:06 -0000 On Sun, Apr 08, 2007 at 11:05:48AM -0700, Garrett Cooper wrote: > I'm trying to see if there's a simple tool that I could code in C/C++ > if necessary to spin down disks automatically to save power and disk > life. Plus, I think that lsof actually would probe the devices and 'wake > them up' instead of keeping them as-is. However, I could be wrong so if > I am please let me know. I read somewhere once that keeping disks spinning makes them last 10x longer. Personally, I've seen more disk failures on workstations which are power-cycled regularly than on systems which are always running. I've also seen disks work just fine while powered that just plain quit immediately after a power cycle. So you may save power by spinning the disks down, but I doubt you're saving disk life (unless they're powered down for weeks at a time). -- Rick C. Petty