Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

26.2. Afficher des informations sur un module

Vous pouvez afficher des informations détaillées sur un module de noyau en utilisant la commande modinfo module_name.

Note

Lorsqu'un nom de module de noyau est saisi en tant qu'argument de l'un des utilitaires kmod, veuillez ne pas ajouter d'extension .ko à la fin du nom. Les noms de module de noyau n'ont pas d'extensions. mais leurs fichiers correspondants en ont.

Exemple 26.1. Répertorier des informations sur un module de noyau avec lsmod

Pour afficher des informations sur le module e1000e, qui est le pilote réseau Intel PRO/1000, veuillez saisir la commande suivante en tant qu'utilisateur root :
~]# modinfo e1000e
filename:       /lib/modules/3.10.0-121.el7.x86_64/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko
version:        2.3.2-k
license:        GPL
description:    Intel(R) PRO/1000 Network Driver
author:         Intel Corporation, <linux.nics@intel.com>
srcversion:     E9F7E754F6F3A1AD906634C
alias:          pci:v00008086d000015A3sv*sd*bc*sc*i*
alias:          pci:v00008086d000015A2sv*sd*bc*sc*i*[certaines lignes alias ont été omises]
alias:          pci:v00008086d0000105Esv*sd*bc*sc*i*
depends:        ptp
intree:         Y
vermagic:       3.10.0-121.el7.x86_64 SMP mod_unload modversions 
signer:         Red Hat Enterprise Linux kernel signing key
sig_key:        42:49:68:9E:EF:C7:7E:95:88:0B:13:DF:E4:67:EB:1B:7A:91:D1:08
sig_hashalgo:   sha256
parm:           debug:Debug level (0=none,...,16=all) (int)
parm:           copybreak:Maximum size of packet that is copied to a new buffer on receive (uint)
parm:           TxIntDelay:Transmit Interrupt Delay (array of int)
parm:           TxAbsIntDelay:Transmit Absolute Interrupt Delay (array of int)
parm:           RxIntDelay:Receive Interrupt Delay (array of int)
parm:           RxAbsIntDelay:Receive Absolute Interrupt Delay (array of int)
parm:           InterruptThrottleRate:Interrupt Throttling Rate (array of int)
parm:           IntMode:Interrupt Mode (array of int)
parm:           SmartPowerDownEnable:Enable PHY smart power down (array of int)
parm:           KumeranLockLoss:Enable Kumeran lock loss workaround (array of int)
parm:           WriteProtectNVM:Write-protect NVM [WARNING: disabling this can lead to corrupted NVM] (array of int)
parm:           CrcStripping:Enable CRC Stripping, disable if your BMC needs the CRC (array of int)
Ci-dessous figurent des descriptions de quelques champs dans la sortie de modinfo :
filename
Chemin absolu vers le fichier objet du noyau .ko. Vous pouvez utiliser modinfo -n en tant que raccourci de commande pour imprimer le nom de fichier filename uniquement.
description
Courte description du module. Vous pouvez utiliser modinfo -d comme raccourci de commande pour imprimer le champ de la description uniquement.
alias
Le champ alias apparaît autant de fois qu'il existe d'alias pour un module, ou il est entièrment omis s'il n'y en a pas.
depends
Ce champ contient une liste de tous les modules séparés par des virgules dont ce module dépend.

Note

Si un module ne possède aucune dépendance, le champ depends peut être omis de la sortie.
parm
Chaque champ parm présente un paramètre de module sous le format parameter_name:description, où :
  • parameter_name est la syntaxe exacte à utiliser lors d'une utilisation comme paramètre de module sur la ligne de commande, ou dans une ligne d'option dans un fichier .conf dans le répertoire /etc/modprobe.d/ ;
  • description est une brève explication de ce que le paramètre fait, ainsi qu'une attente quant au type de valeur acceptée entre parenthèses (comme int, unit ou array of int).

Exemple 26.2. Répertorier les paramètres de modules

Vous pouvez répertorier tous les paramètres pris en charge par le module en utilisant l'option -p. Cependant, comme des informations utiles concernant le type de valeur sont omises de la sortie modinfo -p, il est plus utile d'exécuter :
~]# modinfo e1000e | grep "^parm" | sort
parm:           copybreak:Maximum size of packet that is copied to a new buffer on receive (uint)
parm:           CrcStripping:Enable CRC Stripping, disable if your BMC needs the CRC (array of int)
parm:           debug:Debug level (0=none,...,16=all) (int)
parm:           InterruptThrottleRate:Interrupt Throttling Rate (array of int)
parm:           IntMode:Interrupt Mode (array of int)
parm:           KumeranLockLoss:Enable Kumeran lock loss workaround (array of int)
parm:           RxAbsIntDelay:Receive Absolute Interrupt Delay (array of int)
parm:           RxIntDelay:Receive Interrupt Delay (array of int)
parm:           SmartPowerDownEnable:Enable PHY smart power down (array of int)
parm:           TxAbsIntDelay:Transmit Absolute Interrupt Delay (array of int)
parm:           TxIntDelay:Transmit Interrupt Delay (array of int)
parm:           WriteProtectNVM:Write-protect NVM [WARNING: disabling this can lead to corrupted NVM] (array of int)