1<?xml version='1.0'?>
2<!--*-nxml-*-->
3<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4        "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5<refentry id="modinfo">
6  <refentryinfo>
7    <title>modinfo</title>
8    <productname>kmod</productname>
9
10    <authorgroup>
11      <author>
12        <contrib>Developer</contrib>
13        <firstname>Jon</firstname>
14        <surname>Masters</surname>
15        <email>jcm@jonmasters.org</email>
16      </author>
17      <author>
18        <contrib>Developer</contrib>
19        <firstname>Lucas</firstname>
20        <surname>De Marchi</surname>
21        <email>lucas.de.marchi@gmail.com</email>
22      </author>
23    </authorgroup>
24  </refentryinfo>
25
26  <refmeta>
27    <refentrytitle>modinfo</refentrytitle>
28    <manvolnum>8</manvolnum>
29  </refmeta>
30
31  <refnamediv>
32    <refname>modinfo</refname>
33    <refpurpose>Show information about a Linux Kernel module</refpurpose>
34  </refnamediv>
35
36  <refsynopsisdiv>
37    <cmdsynopsis>
38      <command>modinfo</command>
39      <arg><option>-0</option></arg>
40      <arg><option>-F <replaceable>field</replaceable></option></arg>
41      <arg><option>-k <replaceable>kernel</replaceable></option></arg>
42      <arg rep='repeat'>modulename|filename</arg>
43    </cmdsynopsis>
44    <cmdsynopsis>
45      <command>modinfo -V</command>
46    </cmdsynopsis>
47    <cmdsynopsis>
48      <command>modinfo -h</command>
49    </cmdsynopsis>
50  </refsynopsisdiv>
51
52  <refsect1><title>DESCRIPTION</title>
53    <para>
54      <command>modinfo</command> extracts information from the Linux Kernel
55      modules given on the command line.  If the module name is not a filename,
56      then the
57      <filename>/lib/modules/</filename><replaceable>version</replaceable>
58      directory is searched, as is also done by
59      <citerefentry><refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum></citerefentry>
60      when loading kernel modules.
61    </para>
62    <para>
63      <command>modinfo</command> by default lists each attribute of the module
64      in form <replaceable>fieldname</replaceable> :
65      <replaceable>value</replaceable>, for easy reading.  The filename is
66      listed the same way (although it's not really an attribute).
67    </para>
68    <para>
69      This version of <command>modinfo</command> can understand modules of any
70      Linux Kernel architecture.
71    </para>
72  </refsect1>
73
74  <refsect1><title>OPTIONS</title>
75    <variablelist>
76      <varlistentry>
77        <term>
78          <option>-V</option>
79        </term>
80        <term>
81          <option>--version</option>
82        </term>
83        <listitem>
84          <para>
85            Print the modinfo version.
86          </para>
87        </listitem>
88      </varlistentry>
89      <varlistentry>
90        <term>
91          <option>-F</option>
92        </term>
93        <term>
94          <option>--field</option>
95        </term>
96        <listitem>
97          <para>
98            Only print this field value, one per line.  This is most useful for
99            scripts.  Field names are case-insensitive.  Common fields (which
100            may not be in every module) include <literal>author</literal>,
101            <literal>description</literal>, <literal>license</literal>,
102            <literal>parm</literal>, <literal>depends</literal>, and
103            <literal>alias</literal>.  There are often multiple
104            <literal>parm</literal>, <literal>alias</literal> and
105            <literal>depends</literal> fields.  The special field
106            <literal>filename</literal> lists the filename of the module.
107          </para>
108        </listitem>
109      </varlistentry>
110      <varlistentry>
111        <term>
112          <option>-b <replaceable>basedir</replaceable></option>
113        </term>
114        <term>
115          <option>--basedir <replaceable>basedir</replaceable></option>
116        </term>
117        <listitem>
118          <para>
119            Root directory for modules, <filename>/</filename> by default.
120          </para>
121        </listitem>
122      </varlistentry>
123      <varlistentry>
124        <term>
125          <option>-k <replaceable>kernel</replaceable></option>
126        </term>
127        <listitem>
128          <para>
129            Provide information about a kernel other than the running one. This
130            is particularly useful for distributions needing to extract
131            information from a newly installed (but not yet running) set of
132            kernel modules. For example, you wish to find which firmware files
133            are needed by various modules in a new kernel for which you must
134            make an initrd/initramfs image prior to booting.
135          </para>
136        </listitem>
137      </varlistentry>
138      <varlistentry>
139        <term>
140          <option>-0</option>
141        </term>
142        <term>
143          <option>--null</option>
144        </term>
145        <listitem>
146          <para>
147            Use the ASCII zero character to separate field values, instead of a
148            new line.  This is useful for scripts, since a new line can
149            theoretically appear inside a field.
150          </para>
151        </listitem>
152      </varlistentry>
153      <varlistentry>
154        <term>
155          <option>-a</option>
156          <option>--author</option>
157        </term>
158        <term>
159          <option>-d</option>
160          <option>--description</option>
161        </term>
162        <term>
163          <option>-l</option>
164          <option>--license</option>
165        </term>
166        <term>
167          <option>-p</option>
168          <option>--parameters</option>
169        </term>
170        <term>
171          <option>-n</option>
172          <option>--filename</option>
173        </term>
174        <listitem>
175          <para>
176            These are shortcuts for the <option>--field</option> flag's
177            <literal>author</literal>, <literal>description</literal>,
178            <literal>license</literal>, <literal>parm</literal> and
179            <literal>filename</literal> arguments, to ease the transition
180            from the old modutils <command>modinfo</command>.
181          </para>
182        </listitem>
183      </varlistentry>
184    </variablelist>
185  </refsect1>
186
187  <refsect1><title>COPYRIGHT</title>
188    <para>
189      This manual page originally Copyright 2003, Rusty Russell, IBM
190      Corporation. Maintained by Jon Masters and others.
191    </para>
192  </refsect1>
193
194  <refsect1><title>SEE ALSO</title>
195    <para>
196      <citerefentry>
197        <refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum>
198      </citerefentry>
199    </para>
200  </refsect1>
201</refentry>
202