Linux kernel module parameters

Hi,

Does anyone know if it is possible to know the current value of a kernel module parameters after the module is loaded. Are the values of the parameters advertised at some /proc or /sys location ?
The only thing I know is modinfo, that actually looks a the module .ko and gives a description of the parameters the module uses. But not the current value of the parameter.

Thanks,
Regards.

Depends on the specific module. Some modules do "advertise" one or more parameters under /sys/module/<module_name>/parameters

Thanks fpmurphy,

Yes, I found that for some modules. Unfortunately, it is not the standard behavior so not all modules have their parameters values there. Another thing that I found is that some modules print to the console their parameters values/configuration options and it is possible to see them after boot with dmesg. Fortunatelly this worked form me.
I am working with the igb driver, and need to know the status of the InterruptThrottleRate. dmseg prints a message saying it is off.

Thanks

One way of getting the information you want is to modify ../src/igb_ethtool.c to add the following lines to return the Interrupt Throttle Rates via the ethtool -S --statistics option (or create your own option just to return the relevant value). Add the following to the end of the statistics structure (igb_gstrings_stats[]), compile and reinstall the igb driver.

        { "itr", IGB_STAT(itr) },
        { "itr_setting", IGB_STAT(itr_setting) },
        { "tx_itr", IGB_STAT(tx_itr) },
        { "rx_itr", IGB_STAT(rx_itr) },

I only have an e1000e driver installed at present so cannot test this change for an igb driver but it worked for my e1000e driver. Here is the relevant output from ethtool -S eth0

     itr: 20000
     itr_setting: 3
     tx_itr: 65537
     rx_itr: 1

Hope this helps you.