linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Enlist running kernel modules information
@ 2019-12-03  9:48 Bhaskar Chowdhury
  2019-12-04  3:10 ` Masahiro Yamada
  0 siblings, 1 reply; 9+ messages in thread
From: Bhaskar Chowdhury @ 2019-12-03  9:48 UTC (permalink / raw)
  To: yamada.masahiro, michal.lkml, rdunlap
  Cc: linux-kbuild, linux-kernel, Bhaskar Chowdhury

This is new file to show running kernel modules list.One line bash
script.

Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
 scripts/kernel_modules_info.sh | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100755 scripts/kernel_modules_info.sh

diff --git a/scripts/kernel_modules_info.sh b/scripts/kernel_modules_info.sh
new file mode 100755
index 000000000000..f005c47a3aa6
--- /dev/null
+++ b/scripts/kernel_modules_info.sh
@@ -0,0 +1,23 @@
+#!/bin/bash - 
+#SPDX-License-Identifier: GPL-2.0
+#===============================================================================
+#
+#          FILE: kernel_modules_info.sh
+# 
+#         USAGE: ./kernel_modules_info.sh 
+# 
+#   DESCRIPTION:  Running kernel modules information.
+# 
+#       OPTIONS: ---
+#  REQUIREMENTS: awk
+#          BUGS: ---
+#         NOTES: ---
+#        AUTHOR: Bhaskar Chowdhury (https://about.me/unixbhaskar), unixbhaskar@gmail.com
+#  ORGANIZATION: Independent
+#       CREATED: 12/03/2019 13:52
+#      REVISION:  ---
+#===============================================================================
+
+set -o nounset                              # Treat unset variables as an error
+
+awk '{print $1}' "/proc/modules" | xargs modinfo | awk '/^(filename|desc|depends)/'
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] Enlist running kernel modules information
  2019-12-03  9:48 [PATCH 1/2] Enlist running kernel modules information Bhaskar Chowdhury
@ 2019-12-04  3:10 ` Masahiro Yamada
  2019-12-04  4:22   ` Bhaskar Chowdhury
  2019-12-04 15:07   ` David Sterba
  0 siblings, 2 replies; 9+ messages in thread
From: Masahiro Yamada @ 2019-12-04  3:10 UTC (permalink / raw)
  To: Bhaskar Chowdhury
  Cc: Michal Marek, Randy Dunlap, Linux Kbuild mailing list,
	Linux Kernel Mailing List

On Tue, Dec 3, 2019 at 6:49 PM Bhaskar Chowdhury <unixbhaskar@gmail.com> wrote:
>
> This is new file to show running kernel modules list.One line bash
> script.
>
> Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
> ---
>  scripts/kernel_modules_info.sh | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
>  create mode 100755 scripts/kernel_modules_info.sh
>
> diff --git a/scripts/kernel_modules_info.sh b/scripts/kernel_modules_info.sh
> new file mode 100755
> index 000000000000..f005c47a3aa6
> --- /dev/null
> +++ b/scripts/kernel_modules_info.sh
> @@ -0,0 +1,23 @@
> +#!/bin/bash -
> +#SPDX-License-Identifier: GPL-2.0
> +#===============================================================================
> +#
> +#          FILE: kernel_modules_info.sh
> +#
> +#         USAGE: ./kernel_modules_info.sh
> +#
> +#   DESCRIPTION:  Running kernel modules information.
> +#
> +#       OPTIONS: ---
> +#  REQUIREMENTS: awk
> +#          BUGS: ---
> +#         NOTES: ---
> +#        AUTHOR: Bhaskar Chowdhury (https://about.me/unixbhaskar), unixbhaskar@gmail.com
> +#  ORGANIZATION: Independent
> +#       CREATED: 12/03/2019 13:52
> +#      REVISION:  ---
> +#===============================================================================
> +
> +set -o nounset                              # Treat unset variables as an error
> +
> +awk '{print $1}' "/proc/modules" | xargs modinfo | awk '/^(filename|desc|depends)/'



I want to see a good reason (e.g. useful for other developers) for upstreaming.
This script looks like your custom script, which you can maintain locally.



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] Enlist running kernel modules information
  2019-12-04  3:10 ` Masahiro Yamada
@ 2019-12-04  4:22   ` Bhaskar Chowdhury
  2019-12-04 13:48     ` Enrico Weigelt, metux IT consult
  2019-12-04 15:07   ` David Sterba
  1 sibling, 1 reply; 9+ messages in thread
From: Bhaskar Chowdhury @ 2019-12-04  4:22 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Michal Marek, Randy Dunlap, Linux Kbuild mailing list,
	Linux Kernel Mailing List

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

On 12:10 Wed 04 Dec 2019, Masahiro Yamada wrote:
>On Tue, Dec 3, 2019 at 6:49 PM Bhaskar Chowdhury <unixbhaskar@gmail.com> wrote:
>>
>> This is new file to show running kernel modules list.One line bash
>> script.
>>
>> Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
>> ---
>>  scripts/kernel_modules_info.sh | 23 +++++++++++++++++++++++
>>  1 file changed, 23 insertions(+)
>>  create mode 100755 scripts/kernel_modules_info.sh
>>
>> diff --git a/scripts/kernel_modules_info.sh b/scripts/kernel_modules_info.sh
>> new file mode 100755
>> index 000000000000..f005c47a3aa6
>> --- /dev/null
>> +++ b/scripts/kernel_modules_info.sh
>> @@ -0,0 +1,23 @@
>> +#!/bin/bash -
>> +#SPDX-License-Identifier: GPL-2.0
>> +#===============================================================================
>> +#
>> +#          FILE: kernel_modules_info.sh
>> +#
>> +#         USAGE: ./kernel_modules_info.sh
>> +#
>> +#   DESCRIPTION:  Running kernel modules information.
>> +#
>> +#       OPTIONS: ---
>> +#  REQUIREMENTS: awk
>> +#          BUGS: ---
>> +#         NOTES: ---
>> +#        AUTHOR: Bhaskar Chowdhury (https://about.me/unixbhaskar), unixbhaskar@gmail.com
>> +#  ORGANIZATION: Independent
>> +#       CREATED: 12/03/2019 13:52
>> +#      REVISION:  ---
>> +#===============================================================================
>> +
>> +set -o nounset                              # Treat unset variables as an error
>> +
>> +awk '{print $1}' "/proc/modules" | xargs modinfo | awk '/^(filename|desc|depends)/'
>
>
>
>I want to see a good reason (e.g. useful for other developers) for upstreaming.
>This script looks like your custom script, which you can maintain locally.

I think the usefulness comes from developers wants to see what are the
modules are using by the running kernel in formatted way. 

This is very simple way to enlist all the modules with descriptions of
it.So , they can easily parse it with other scripts.

I believe you have already copy and paste the single line on your
terminal to see the output it produces, if not, I have already sent a
mail which includes the out of it.

If and only if, no other tool or mechanism(which might have skips my
eyes and knowledge) to find and display information this way.

Kindly, share me the other way , you can achieve that. This is a generic
script,and expecting stuff in common place, so everybody can use it.No,
special requirement is needed.

Here is little output,if you missed my other mail with it...

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

These output can be parse by other scripts too(cliche...sorry) ..

Thanks,
Bhaskar

>
>
>-- 
>Best Regards
>Masahiro Yamada

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] Enlist running kernel modules information
  2019-12-04  4:22   ` Bhaskar Chowdhury
@ 2019-12-04 13:48     ` Enrico Weigelt, metux IT consult
  2019-12-05  3:30       ` Bhaskar Chowdhury
  0 siblings, 1 reply; 9+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-12-04 13:48 UTC (permalink / raw)
  To: Bhaskar Chowdhury, Masahiro Yamada, Michal Marek, Randy Dunlap,
	Linux Kbuild mailing list, Linux Kernel Mailing List

On 04.12.19 05:22, Bhaskar Chowdhury wrote:

Hi,

> I think the usefulness comes from developers wants to see what are the
> modules are using by the running kernel in formatted way.
> This is very simple way to enlist all the modules with descriptions of
> it.So , they can easily parse it with other scripts.

IMHO, this is a good thing to have. I can even imagine it shipped by
distros, for better bug reports.

OTOH, if it's about the currently running kernel and loaded modules, why
not putting this into /proc or /sys ?


--mtx

-- 
Dringender Hinweis: aufgrund existenzieller Bedrohung durch "Emotet"
sollten Sie *niemals* MS-Office-Dokumente via E-Mail annehmen/öffenen,
selbst wenn diese von vermeintlich vertrauenswürdigen Absendern zu
stammen scheinen. Andernfalls droht Totalschaden.
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] Enlist running kernel modules information
  2019-12-04  3:10 ` Masahiro Yamada
  2019-12-04  4:22   ` Bhaskar Chowdhury
@ 2019-12-04 15:07   ` David Sterba
  2019-12-05  3:25     ` Bhaskar Chowdhury
  1 sibling, 1 reply; 9+ messages in thread
From: David Sterba @ 2019-12-04 15:07 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Bhaskar Chowdhury, Michal Marek, Randy Dunlap,
	Linux Kbuild mailing list, Linux Kernel Mailing List

On Wed, Dec 04, 2019 at 12:10:25PM +0900, Masahiro Yamada wrote:
> On Tue, Dec 3, 2019 at 6:49 PM Bhaskar Chowdhury <unixbhaskar@gmail.com> wrote:
> > +awk '{print $1}' "/proc/modules" | xargs modinfo | awk '/^(filename|desc|depends)/'
> 
> I want to see a good reason (e.g. useful for other developers) for upstreaming.
> This script looks like your custom script, which you can maintain locally.

I think the verbosity should be added to either lsmod or modinfo, not
some script in kernel git.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] Enlist running kernel modules information
  2019-12-04 15:07   ` David Sterba
@ 2019-12-05  3:25     ` Bhaskar Chowdhury
       [not found]       ` <CAK7LNARdOGfvc_8TMX+KbJQ1DRGy8_xZsdDye1ZrvimSS1VoFQ@mail.gmail.com>
  2019-12-06 15:48       ` Enrico Weigelt, metux IT consult
  0 siblings, 2 replies; 9+ messages in thread
From: Bhaskar Chowdhury @ 2019-12-05  3:25 UTC (permalink / raw)
  To: dsterba, Masahiro Yamada, Michal Marek, Randy Dunlap,
	Linux Kbuild mailing list, Linux Kernel Mailing List

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

On 16:07 Wed 04 Dec 2019, David Sterba wrote:
>On Wed, Dec 04, 2019 at 12:10:25PM +0900, Masahiro Yamada wrote:
>> On Tue, Dec 3, 2019 at 6:49 PM Bhaskar Chowdhury <unixbhaskar@gmail.com> wrote:
>> > +awk '{print $1}' "/proc/modules" | xargs modinfo | awk '/^(filename|desc|depends)/'
>> 
>> I want to see a good reason (e.g. useful for other developers) for upstreaming.
>> This script looks like your custom script, which you can maintain locally.
>
>I think the verbosity should be added to either lsmod or modinfo, not
>some script in kernel git.

lsmod and modinfo already are pretty verbose and the one liner is using
one of them to cut thing out of it....can you give it another look???

Moreover,this is sort and precise and can be parsed by other scripts.

The whole point behind this is to give the developers a convenient point
without going through all the rigorous details.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] Enlist running kernel modules information
  2019-12-04 13:48     ` Enrico Weigelt, metux IT consult
@ 2019-12-05  3:30       ` Bhaskar Chowdhury
  0 siblings, 0 replies; 9+ messages in thread
From: Bhaskar Chowdhury @ 2019-12-05  3:30 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: Masahiro Yamada, Michal Marek, Randy Dunlap,
	Linux Kbuild mailing list, Linux Kernel Mailing List

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8; format=flowed, Size: 1507 bytes --]

On 14:48 Wed 04 Dec 2019, Enrico Weigelt, metux IT consult wrote:
>On 04.12.19 05:22, Bhaskar Chowdhury wrote:
>
>Hi,
>
>> I think the usefulness comes from developers wants to see what are the
>> modules are using by the running kernel in formatted way.
>> This is very simple way to enlist all the modules with descriptions of
>> it.So , they can easily parse it with other scripts.
>
>IMHO, this is a good thing to have. I can even imagine it shipped by
>distros, for better bug reports.
>
>OTOH, if it's about the currently running kernel and loaded modules, why
>not putting this into /proc or /sys ?

The reason being not putting in the /proc or /sys is, it is not
dynamically generated stuff. This is small script which do a specific
task ,out of the information available  in /proc or /sys.

And essentially resides in the scripts directory for easy finding and
using.  

:)

~Bhaskar
>
>
>--mtx
>
>-- 
>Dringender Hinweis: aufgrund existenzieller Bedrohung durch "Emotet"
>sollten Sie *niemals* MS-Office-Dokumente via E-Mail annehmen/öffenen,
>selbst wenn diese von vermeintlich vertrauenswürdigen Absendern zu
>stammen scheinen. Andernfalls droht Totalschaden.
>---
>Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
>werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
>GPG/PGP-Schlüssel zu.
>---
>Enrico Weigelt, metux IT consult
>Free software and Linux embedded engineering
>info@metux.net -- +49-151-27565287

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] Enlist running kernel modules information
       [not found]       ` <CAK7LNARdOGfvc_8TMX+KbJQ1DRGy8_xZsdDye1ZrvimSS1VoFQ@mail.gmail.com>
@ 2019-12-06  8:10         ` Bhaskar Chowdhury
  0 siblings, 0 replies; 9+ messages in thread
From: Bhaskar Chowdhury @ 2019-12-06  8:10 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: dsterba, Michal Marek, Randy Dunlap, Linux Kbuild mailing list,
	Linux Kernel Mailing List

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

On 01:08 Fri 06 Dec 2019, Masahiro Yamada wrote:
>   On Thu, Dec 5, 2019 at 12:25 PM Bhaskar Chowdhury
>   <[1]unixbhaskar@gmail.com> wrote:
>
>     On 16:07 Wed 04 Dec 2019, David Sterba wrote:
>     >On Wed, Dec 04, 2019 at 12:10:25PM +0900, Masahiro Yamada wrote:
>     >> On Tue, Dec 3, 2019 at 6:49 PM Bhaskar Chowdhury
>     <[2]unixbhaskar@gmail.com> wrote:
>     >> > +awk '{print $1}' "/proc/modules" | xargs modinfo | awk
>     '/^(filename|desc|depends)/'
>     >>
>     >> I want to see a good reason (e.g. useful for other developers)
>     for upstreaming.
>     >> This script looks like your custom script, which you can maintain
>     locally.
>     >
>     >I think the verbosity should be added to either lsmod or modinfo,
>     not
>     >some script in kernel git.
>     lsmod and modinfo already are pretty verbose and the one liner is
>     using
>     one of them to cut thing out of it....can you give it another
>     look???
>     Moreover,this is sort and precise and can be parsed by other
>     scripts.
>     The whole point behind this is to give the developers a convenient
>     point
>     without going through all the rigorous details.
>
>   lsmod and modinfo are good.
>   If you are not satisfied with the current format,
>   talk to the kmod maintainer.
>   As a maintainer, I need to avoid the situation
>   where upstream tree is flooded with weird scripts like this.
>   One more thing:
>   Despite advice from Randy over again,
>   you are still not able to submit a patch correctly.
>   (see what you sent as v2).
>   Do not get me wrong. I am not saying you to send v3.
>   I do not like this patch. Please stop.
>   --
I completely get you. I should stop sending this. Thanks for the heads
up. 

And I was not denying the verbosity of lsmod and modinfo , as I was
pointing out to someone else.

About the V2, this was a mistake , I know once I saw it alas! after
sending it you. So, my apology. 

One thing get it straight , I am NOT trying to flooding with some airy
fairy script , I know what it takes to maintain that bloody thing.

Your time is precious like mine, never try to gobbles it by sending
garbage.

I was thinking make it easy for others, not sure why you think it's
wired.

Again , thanks for the heads up...above statements are STRICTLY NOT in my
defence not to cover the mistake.

>   Best Regards
>   Masahiro Yamada
>
>References
>
>   1. mailto:unixbhaskar@gmail.com
>   2. mailto:unixbhaskar@gmail.com

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] Enlist running kernel modules information
  2019-12-05  3:25     ` Bhaskar Chowdhury
       [not found]       ` <CAK7LNARdOGfvc_8TMX+KbJQ1DRGy8_xZsdDye1ZrvimSS1VoFQ@mail.gmail.com>
@ 2019-12-06 15:48       ` Enrico Weigelt, metux IT consult
  1 sibling, 0 replies; 9+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-12-06 15:48 UTC (permalink / raw)
  To: Bhaskar Chowdhury, dsterba, Masahiro Yamada, Michal Marek,
	Randy Dunlap, Linux Kbuild mailing list,
	Linux Kernel Mailing List

On 05.12.19 04:25, Bhaskar Chowdhury wrote:

Hi,

> The whole point behind this is to give the developers a convenient point
> without going through all the rigorous details.

I see your point, but I wonder whether it maybe better should go
into kmod.

--mtx

---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-12-06 15:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03  9:48 [PATCH 1/2] Enlist running kernel modules information Bhaskar Chowdhury
2019-12-04  3:10 ` Masahiro Yamada
2019-12-04  4:22   ` Bhaskar Chowdhury
2019-12-04 13:48     ` Enrico Weigelt, metux IT consult
2019-12-05  3:30       ` Bhaskar Chowdhury
2019-12-04 15:07   ` David Sterba
2019-12-05  3:25     ` Bhaskar Chowdhury
     [not found]       ` <CAK7LNARdOGfvc_8TMX+KbJQ1DRGy8_xZsdDye1ZrvimSS1VoFQ@mail.gmail.com>
2019-12-06  8:10         ` Bhaskar Chowdhury
2019-12-06 15:48       ` Enrico Weigelt, metux IT consult

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).