Informazioni sui moduli in Linux
In Linux i moduli del kernel sono molto importanti, in quanto sono dei "pezzi di codice" che possono essere abilitati per aggiungere determinate funzioni.
Anche se non lo sapete, ne state già facendo largo uso.
Vediamo come ottenere un pò di informazioni.
Cominciamo con il classico lsmod:
$ lsmod
Module Size Used by
vfat 24576 1
fat 86016 1 vfat
nvidia_drm 65536 8
nvidia_modeset 1187840 25 nvidia_drm
nvidia 34971648 1642 nvidia_modeset
rfkill 28672 3
intel_rapl_msr 20480 0
intel_rapl_common 28672 1 intel_rapl_msr
x86_pkg_temp_thermal 20480 0
intel_powerclamp 20480 0
coretemp 20480 0
kvm_intel 331776 0
kvm 1015808 1 kvm_intel
snd_soc_rt5640 147456 0
snd_hda_codec_realtek 147456 1
iTCO_wdt 16384 0
irqbypass 16384 1 kvm
snd_hda_codec_generic 98304 1 snd_hda_codec_realtek
mei_hdcp 24576 0
snd_hda_codec_hdmi 73728 2
.................
Questo comandi ci mostra i moduli del kernel attualmente caricati.
Da qui possiamo usare modinfo per avere più informazioni; ad esempio:
$ modinfo ext4
filename: /lib/modules/5.12.1-arch1-1/kernel/fs/ext4/ext4.ko.xz
softdep: pre: crc32c
license: GPL
description: Fourth Extended Filesystem
author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others
alias: fs-ext4
alias: ext3
alias: fs-ext3
alias: ext2
alias: fs-ext2
srcversion: D9D69D9EAAE3F0676C26B69
depends: mbcache,jbd2,crc16
retpoline: Y
intree: Y
name: ext4
vermagic: 5.12.1-arch1-1 SMP preempt mod_unload
sig_id: PKCS#7
signer: Build time autogenerated kernel key
sig_key: 56:42:55:6B:A7:3F:68:ED:74:4D:ED:9E:3D:00:AE:F2:35:81:60:E8
sig_hashalgo: sha512
signature: 95:CA:54:3F:ED:15:CA:6F:C1:D5:FC:7D:94:FA:FB:A2:03:BA:DF:93:
8F:3A:AD:D1:7C:71:D7:00:1A:9F:C6:97:0A:40:2E:6E:F2:89:0C:EB:
75:36:B6:18:EF:05:4D:2F:38:81:B5:2F:5A:86:85:CB:9C:A4:E4:53:
37:F7:87:50:56:BB:09:7A:EF:2F:1A:D2:0D:BA:3C:5F:B9:24:00:E1:
25:52:9E:1A:F2:5D:49:BB:C5:19:64:34:75:6C:C7:D6:FD:A4:1A:81:
1F:E4:FB:D9:B9:81:5D:A7:C8:AA:F4:41:89:DB:67:F8:A2:0D:60:D5:
B9:02:71:E1:3D:F2:21:3B:DC:7F:00:99:4D:D7:62:0D:94:76:A6:17:
23:F3:5D:F3:7E:EC:B0:53:4C:C5:20:68:EE:54:BD:BE:23:4E:61:59:
D9:CB:FB:0E:64:B3:FF:5B:52:06:2C:B9:60:D8:EB:23:77:98:1A:C4:
32:04:DD:FF:0A:5D:75:7D:08:7B:E2:F5:93:B9:99:31:3B:9F:E0:F8:
8D:5F:9C:BB:AB:DF:02:25:55:ED:E0:31:8F:69:5B:B5:23:65:A4:6E:
1C:A5:E6:A8:CF:5F:C1:9B:4F:24:25:51:C2:71:51:11:73:07:68:D0:
E3:97:54:E6:46:C2:94:20:D0:13:C4:FE:5D:46:AB:C2:47:0B:27:24:
67:86:F1:E1:12:BB:FA:5C:05:6D:43:B4:EE:C1:7E:F8:1E:69:0B:95:
E1:79:02:B3:5B:E7:69:28:4F:C5:BE:0B:FD:4C:5B:04:26:68:77:83:
FA:E3:AD:E7:3B:CE:5E:3D:A4:3A:E7:24:FC:83:7A:FF:E3:43:D4:A0:
99:48:AC:2B:F1:92:A8:9A:08:99:42:FC:14:23:CF:AB:14:32:4B:8C:
C0:FD:34:85:71:A3:F7:8F:D3:BC:1A:62:DD:24:C2:A2:FC:9A:01:32:
80:B8:03:89:3D:D9:44:A1:16:6C:3A:7B:CE:F9:F8:1B:01:58:B0:F0:
EE:D9:E9:AA:0F:DC:6A:F6:CB:9D:C1:F1:09:D7:37:0B:8E:B9:17:34:
5C:F8:B3:07:E0:D0:C3:75:48:5B:75:FC:D3:DF:FF:F9:F9:43:18:CB:
DC:AC:02:3B:06:CE:BA:B3:A0:EE:76:72:E6:AE:98:50:2D:8B:40:F2:
6D:34:2C:BF:45:89:A7:DC:61:4F:F3:F3:D6:F5:20:BB:7B:87:DE:DB:
0E:B5:1E:E3:5D:1D:1A:E4:17:AE:D6:60:44:43:51:C6:45:3D:09:47:
CA:C4:40:87:A5:4E:17:D2:0D:78:45:B7:46:78:A9:02:0D:0A:4C:FC:
E0:98:DF:7C:0D:BE:0B:35:44:CC:27:96
Potete usare le varie opzioni che trovate nella man page per visualizzare solo alcuni dati.
Enjoy!
linux lsmod modinfo
Commentami!