accessing geom stats from the kernel

Nikolay Denev ndenev at
Tue Dec 8 18:35:38 UTC 2009


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?

Nikolay Denev

More information about the freebsd-hackers mailing list