blob: 9fe0324a25276235f9bd700088f6c51bec0b2e55 [file] [log] [blame]
Lucas De Marchi9f11c432012-01-12 14:20:10 -02001<?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>
Lucas De Marchi2726da52014-01-02 17:13:38 -020021 <email>lucas.de.marchi@gmail.com</email>
Lucas De Marchi9f11c432012-01-12 14:20:10 -020022 </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>
Dave Reisnerffeccb52012-07-25 19:40:10 -040079 </term>
80 <term>
Lucas De Marchi9f11c432012-01-12 14:20:10 -020081 <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>
Dave Reisnerffeccb52012-07-25 19:40:10 -040092 </term>
93 <term>
Lucas De Marchi9f11c432012-01-12 14:20:10 -020094 <option>--field</option>
95 </term>
96 <listitem>
97 <para>
98 Only print this field value, one per line. This is most useful for
Miklos Vajna9be01622012-01-17 01:48:11 +010099 scripts. Field names are case-insensitive. Common fields (which
Lucas De Marchi9f11c432012-01-12 14:20:10 -0200100 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>
Dave Reisner072122f2012-07-25 19:29:40 -0400112 <option>-b <replaceable>basedir</replaceable></option>
Dave Reisnerffeccb52012-07-25 19:40:10 -0400113 </term>
114 <term>
Dave Reisner072122f2012-07-25 19:29:40 -0400115 <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>
Lucas De Marchi9f11c432012-01-12 14:20:10 -0200125 <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>
Dave Reisnerffeccb52012-07-25 19:40:10 -0400141 </term>
142 <term>
Lucas De Marchi9f11c432012-01-12 14:20:10 -0200143 <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>
Dave Reisnerff990962012-07-25 19:36:40 -0400156 <option>--author</option>
157 </term>
158 <term>
Lucas De Marchi9f11c432012-01-12 14:20:10 -0200159 <option>-d</option>
Dave Reisnerff990962012-07-25 19:36:40 -0400160 <option>--description</option>
161 </term>
162 <term>
Lucas De Marchi9f11c432012-01-12 14:20:10 -0200163 <option>-l</option>
Dave Reisnerff990962012-07-25 19:36:40 -0400164 <option>--license</option>
165 </term>
166 <term>
Lucas De Marchi9f11c432012-01-12 14:20:10 -0200167 <option>-p</option>
Dave Reisnerff990962012-07-25 19:36:40 -0400168 <option>--parameters</option>
169 </term>
170 <term>
Lucas De Marchi9f11c432012-01-12 14:20:10 -0200171 <option>-n</option>
Dave Reisnerff990962012-07-25 19:36:40 -0400172 <option>--filename</option>
Lucas De Marchi9f11c432012-01-12 14:20:10 -0200173 </term>
174 <listitem>
175 <para>
Dave Reisner1a3fa1a2012-09-08 12:22:11 -0400176 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>.
Lucas De Marchi9f11c432012-01-12 14:20:10 -0200181 </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>