USA Linux Users Group Forum Index
Log in Register FAQ Memberlist Search USA Linux Users Group Forum Index Album

Find kernel driver/module

 
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Servers and Server Administration
View previous topic :: View next topic  
Author Message
sysconfig
New Member


Joined: 12 Oct 2024
Posts: 23

PostPosted: Thu Oct 12, 2024 12:30 pm    Post subject: Find kernel driver/module Reply with quote

To find out what a particular driver/module does you can usually use the modinfo command:

# modinfo -d e1000
Intel(R) PRO/1000 Network Driver
#
# modinfo -d hangcheck-timer
Hangcheck-timer detects when the system has gone out to lunch past a certain margin.
#

To get a list of parameters supported by a kernel driver/module, the modinfo command will usually provide the information:

# modinfo -p e1000
debug:Debug level (0=none,...,16=all)
InterruptThrottleRate:Interrupt Throttling Rate
RxAbsIntDelay:Receive Absolute Interrupt Delay
RxIntDelay:Receive Interrupt Delay
TxAbsIntDelay:Transmit Absolute Interrupt Delay
TxIntDelay:Transmit Interrupt Delay
XsumRX:Disable or enable Receive Checksum offload
FlowControl:Flow Control setting
AutoNeg:Advertised auto-negotiation setting
Duplex:Duplex setting
Speed:Speed setting
RxDescriptors:Number of receive descriptors
TxDescriptors:Number of transmit descriptors
#
# modinfo -p hangcheck-timer
hangcheck_dump_tasks:If nonzero, the machine will dump the system task state when the timer margin is exceeded.
hangcheck_reboot:If nonzero, the machine will reboot when the timer margin is exceeded.
hangcheck_margin:If the hangcheck timer has been delayed more than hangcheck_margin seconds, the driver will fire.
hangcheck_tick:Timer delay.
#

To set the parameters when modules are loaded, you can add entries to /etc/modprobe.conf on RHEL or /etc/modprobe.conf.local on SLES. For example:

options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180

To load the module and see the new settings, run:

# modprobe -v hangcheck-timer

insmod /lib/modules/2.6.9-22.EL/kernel/drivers/char/hangcheck-timer.ko hangcheck_tick=20 hangcheck_margin=280
#
# dmesg | tail -1
Hangcheck: starting hangcheck timer 0.5.0 (tick is 30 seconds, margin is 180 seconds).
#

The newly loaded module will be at the top of the lsmod list:

# lsmod | head -2
Module Size Used by
hangcheck_timer 3289 0
#

To unload the module, run:

# rmmod hangcheck-timer


thanks,


Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
mkitwrk
New Member


Joined: 06 Mar 2024
Posts: 2
Location: Greenville, SC

PostPosted: Thu Mar 06, 2024 9:10 pm    Post subject: Reply with quote

How does one fix the situation where modinfo cannot locate the driver module?
Here's the scenario and how I fixed it:

I run 'lsmod' and get (snip):
Module Size Used by
st 42912 0
bitblit 6208 0

And if I run 'modinfo st' I get (snip):
filename: /lib/modules/2.6.12/kernel/drivers/scsi/st.ko
author: Kai Makisara
description: SCSI Tape Driver
license: GPL
vermagic: 2.6.12 SMP 686 gcc-4.0

But, when I run 'modinfo bitblit' I get:
modinfo: could not find module bitblit

So, the answer is to run 'depmod' after saving your current modules.dep file... just in case...
And -- you have to log out and back in before bitblit can be found.
Here are the commands I used:

cd /lib/modules/[currentkernelversion]
cp modules.dep modules.dep.save
cd /
depmod
[Log off system]
[Log into system]
modinfo bitblit

And it shows:
filename: /lib/modules/2.6.12/kernel/drivers/video/console/bitblit.ko
author: Antonino Daplas <adaplas@pol.net>
description: Bit Blitting Operation
license: GPL
vermagic: 2.6.12 SMP 686 gcc-4.0

Enjoy!



_________________
Debian Sarge 32bit 2.4 kernel
Debian Etch 32&64bit 2.6 kernel
RedHat ES4 32bit 2.4 kernel
RedHat ES5 32&64bit 2.6 kernel
Old Caldera 2.2 kernel
Back to top
View user's profile Send private message AIM Address MSN Messenger
JP
Linux Guru


Joined: 07 Jul 2024
Posts: 6670
Location: Central Montana

PostPosted: Fri Mar 07, 2024 12:50 am    Post subject: Reply with quote

I think you probably should have put that into the "Command Line Commands" forum, so it will be easier to find when a person recollects the thread and goes looking for it Wink. Thanks for the info!

mkitwrk Welcome to USALUG! Glad to have you aboard Very Happy Very Happy



_________________
Dell Box - Arch Linux
Dell Lappy - DreamLinux 3.5 - Default OS
Mepis 8.0 - Backup
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Servers and Server Administration All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All content © 2024-2009 - Usa Linux Users Group
This forum is powered by phpBB. © 2024-2009 phpBB Group
Theme created by phpBBStyles.com and modified by Crouse