lsmod command

lsmod

From Wikipedia, the free encyclopedia

Jump to navigationJump to search

 

lsmod is a command on Linux systems. It shows which loadable kernel modules are currently loaded.

Abridged example output:

# lsmod
Module                  Size  Used by
af_packet              27392  2 
8139too                30592  0 
snd_cs46xx             96872  3 
snd_pcm_oss            55808  1 
snd_mixer_oss          21760  2 snd_pcm_oss
ip6table_filter         7424  1 
ip6_tables             19728  1 ip6table_filter
ipv6                  290404  22 
xfs                   568384  4 
sis900                 18052  5 
libata                169920  1 pata_sis
scsi_mod              158316  3 usb_storage,sd_mod,libata
usbcore               155312  6 ohci_hcd, usb_storage, usbhid

"Module" denotes the name of the module. "Size" denotes the size of the module (not memory used).[1] "Used by" shows that number of times the module is currently in use by running programs. Next to this is a list of other modules which refer to this one. The "Used by" list is sometimes incomplete.[2] If the module controls its own unloading via a can_unload routine then the use count displayed by lsmod is always -1, irrespective of the real use count.

See also[edit]

References[edit]

  1. ^ "Kernel Module Utilities". Archived from the original on 11 September 2016. Retrieved 31 Jan 2013.
  2. ^ user502515. "Re: How to get complete dependency list of kernel modules at runtime"Stack Overflow. Retrieved 11 October 2012.
 This Linux-related article is a stub. You can help Wikipedia by expanding it.

Run lsmod at the command line to find out what kernel modules are currently loaded:

lsmod

The command outputs information for each loaded kernel module on a new line:

Module                  Size  Used by
cmac                   16384  0
rfcomm                 81920  4
...
ahci                   40960  1
intel_lpss_pci         20480  0
i2c_i801               32768  0
libahci                32768  1 ahci
intel_lpss             16384  1 intel_lpss_pci
...

Each line has three columns:

  • Module - The first column shows the name of the module.
  • Size - The second column shows the size of the module in bytes.
  • Used by - The third column shows a number that indicates how many instances of the module are currently used. A value of zero means that the module is not used. The comma-separated list after the number shows what is using the module.

 

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

c_hnie

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值