All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bhaskar Chowdhury <unixbhaskar@gmail.com>
To: yamada.masahiro@socionext.com, michal.lkml@markovi.net,
	rdunlap@infradead.org
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RFC scripts] Modules info in one liner script
Date: Tue, 3 Dec 2019 12:58:02 +0530	[thread overview]
Message-ID: <20191203072802.GA224932@ArchLinux> (raw)

[-- Attachment #1: Type: text/plain, Size: 1477 bytes --]

Hi Masahiro/Michal/Randy.

This is very trivial and one line script to extract out the running
kernel modules with descriptions, like below

filename:
/lib/modules/5.4.1-arch1-1ArchLinux-5.4.1/kernel/drivers/ata/libata.ko.xz
description:    Library module for ATA devices
depends:        scsi_mod
filename:
/lib/modules/5.4.1-arch1-1ArchLinux-5.4.1/kernel/drivers/usb/host/xhci-pci.ko.xz
description:    xHCI PCI Host Controller Driver
depends:        xhci-hcd
filename:
/lib/modules/5.4.1-arch1-1ArchLinux-5.4.1/kernel/drivers/usb/host/xhci-hcd.ko.xz
description:    'eXtensible' Host Controller (xHC) Driver
depends:
filename:
/lib/modules/5.4.1-arch1-1ArchLinux-5.4.1/kernel/drivers/scsi/scsi_mod.ko.xz
description:    SCSI core
depends:
filename:
/lib/modules/5.4.1-arch1-1ArchLinux-5.4.1/kernel/arch/x86/crypto/crc32c-intel.ko.xz
description:    CRC32c (Castagnoli) optimization using Intel Hardware.
depends:
filename:
/lib/modules/5.4.1-arch1-1ArchLinux-5.4.1/kernel/drivers/usb/host/ehci-pci.ko.xz
description:    EHCI PCI platform driver
depends:        ehci-hcd
filename:
/lib/modules/5.4.1-arch1-1ArchLinux-5.4.1/kernel/drivers/usb/host/ehci-hcd.ko.xz
description:    USB 2.0 'Enhanced' Host Controller (EHCI) Driver


and the code to do this :

 awk '{print $1}' "/proc/modules" | xargs modinfo | awk
 '/^(filename|desc|depends)/'

 Can we put in a script called "kernel_modules_info.sh"
 under scripts dir??

 Kindly let me know your thoughts.

 Thanks,
 Bhaskar


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2019-12-03  7:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03  7:28 Bhaskar Chowdhury [this message]
2019-12-04 13:38 ` [RFC scripts] Modules info in one liner script Enrico Weigelt, metux IT consult

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191203072802.GA224932@ArchLinux \
    --to=unixbhaskar@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=rdunlap@infradead.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.