[Gllug] Discover device node associated with a module

John Hearns john.hearns at streamline-computing.com
Sun Apr 30 16:02:43 UTC 2006


On Sat, 2006-04-29 at 18:36 +0100, Tom Schutzer-Weissmann wrote:
> This is something I've wanted to know for ages: when I load a kernel
> module that provides a device driver, is there any way to find out what
> device node it's driving? 


Slightly topical for me, as I was working with loading IPMI drivers onto
cluster nodes this week, which we can choose to run in a RAMdisk mode
(booting over a hundred machines totally running in RAM is funky,
and I do find it fun to power them all on or off in sequence via IPMI.
It is a nice demo to power on 100 plus Opterons nodes in a timed
sequence, and hear the noise level grow.)

modprobe ipmi_msghandler
modprobe ipmi_devintf
modprobe ipmi_si
maj=$(cat /proc/devices | awk '/ipmidev/{print $1}')
if [ "$maj" ]; then
    test -e /dev/ipmi0 && rm -f /dev/ipmi0
    /bin/mknod /dev/ipmi0 c $maj 0
fi

I guess  you have to know the device name, which isn't an answer to your
question.



-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list