LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-27-2008, 09:21 AM   #1
fmyhr
LQ Newbie
 
Registered: Feb 2008
Distribution: debian, mepis, kubuntu
Posts: 13

Rep: Reputation: 0
Question Show options that kernel module was loaded with?


Hi,

Anyone know a way to tell what options a kernel module was loaded with? Something like /proc/cmdline but for loadable modules? I've googled and poked around /sys and /proc without luck...

Thanks,
Frank
 
Old 02-27-2008, 11:21 AM   #2
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Rep: Reputation: 30
uname -a will tell you the kernel you are running if that helps
or go into /boot/grub/menu.lst you will see the boot menu

Last edited by mahmoud; 02-27-2008 at 11:23 AM.
 
Old 02-27-2008, 03:51 PM   #3
fmyhr
LQ Newbie
 
Registered: Feb 2008
Distribution: debian, mepis, kubuntu
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks for the quick reply, mahmoud.

Your suggestions are good for seeing the name/version of the running kernel, and the kernel boot options for each kernel that grub knows about (just as you said).

I was hoping to find a way to determine what options/parameters had been fed into a loadable kernel module at the time it was loaded. These options are set in files in /etc/modprobe.d/

I've poked around a bit more and I think the answer is that there isn't a way to tell what parameters were set when the module got loaded. Each module can display a subset of its parameters in /sys. For example, loading the module snd_usb_audio creates the directory:
/sys/module/snd_usb_audio/parameters

In /etc/modprobe.d/options I have the line:
options snd_usb_audio async_unlink=0

and after loading that module I get:
% cat /sys/module/snd_usb_audio/parameters/async_unlink
N

But AFAIK it's up to each module to decide which of its parameters to export to /sys. And the values in /sys reflect the current state, not the state requested when the module was loaded.

If anyone knows differently, please tell me :-)

Thanks again,
Frank
 
Old 02-27-2008, 06:08 PM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Frank,
If you told us what your exact problem is, rather than just the steps you have taken to try to resolve it, we might be able to see the bigger picture and be better informed to help you.
 
Old 02-27-2008, 09:40 PM   #5
fmyhr
LQ Newbie
 
Registered: Feb 2008
Distribution: debian, mepis, kubuntu
Posts: 13

Original Poster
Rep: Reputation: 0
Hi tredegar,

Sorry if I was so mysterious :-) Bigger picture is I am loading thinkpad_acpi on a 600X running kubuntu gutsy. Wanted to see if I could control the fan, so put this in /etc/modules.d/options:
options thinkpad_acpi fan_control=1

When I loaded the thinkpad_acpi module I could see /proc/acpi/ibm/fan but trying
echo 'level 1' > /proc/acpi/ibm/fan
gave a "write error: invalid argument"

Before concluding that the 600x doesn't support fan control through thinkpad_acpi, I thought I'd make sure that the fan_control=1 option was in fact being set when the module was loaded. I couldn't tell for sure from the system log, so wondered if there was some other way to tell. Since then I've tried setting the thinkpad_acpi options debug=0xffff or debug=0x0000 in /etc/modules.d/options and can see the difference between these two in the number of things being logged during module load. So I have to conclude that the fan_control=1 option is being picked up but simply does not work on the 600x.

Bottom line is that I had no reason to suspect that /etc/modprobe.d options weren't being set, but grew curious if there was any way to tell. And short answer AFAICT is that in the general case there is no way to tell.

Thanks,
Frank
 
Old 02-28-2008, 05:17 AM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
This is "experimental", and the module needs to be loaded with the experimental=1 option, for you even to attempt to control the fanspeed.

See here: http://ibm-acpi.sourceforge.net/README
 
Old 01-28-2009, 08:29 AM   #7
TFL
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 1
systool is your friend...

Hi

Try using systool. For example, I view the active options for my storage controllers using systool -c scsi_host -av or systool -c fc_host -av.

Regards, Mike
 
Old 01-29-2009, 08:28 AM   #8
fmyhr
LQ Newbie
 
Registered: Feb 2008
Distribution: debian, mepis, kubuntu
Posts: 13

Original Poster
Rep: Reputation: 0
systool

Mike, thanks for pointing out systool. Can be handier than poking around manually through /sys

In case it helps anybody else, systool is part of the sysfsutils package on Debian and Ubuntu.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Truecrypt: Kernel module not loaded Synatic Linux - Software 4 01-21-2006 02:43 PM
the kernel module for tv support could not be loaded ylts SUSE / openSUSE 3 04-15-2005 08:14 AM
paraport_pc module loaded with wrong options, st not loaded adrianmariano Debian 2 12-18-2004 09:37 PM
Module loaded into kernel at Boot Wolf_Assassin Linux - Software 11 08-11-2004 05:57 PM
kernel: No module symbols loaded - kernel modules not enabled. Qucho Debian 9 05-26-2004 02:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration