Discovering list of open files from "kernel level" without using utils like lsof

Rick C. Petty rick-freebsd at kiwi-computer.com
Mon Apr 9 20:23:06 UTC 2007


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


More information about the freebsd-hackers mailing list