Copyright (C) 2002, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
/usr/sbin/modinfo [-c] [-w] [-i module-id]
The modinfo utility displays information about the loaded modules. The format of the information is as follows:
Id Loadaddr Size Info Rev Module Name
where Id is the module ID, Loadaddr is the starting text address in hexadecimal, Size is the size of text, data, and bss in hexadecimal bytes, Info is module specific information, Rev is the revision of the loadable modules system, and Module Name is the filename and description of the module.
The module specific information is the block and character major numbers for drivers, the system call number for system calls, and unspecified for other module types.
The following options are supported: -c
Display the number of instances of the module loaded and the module's current state.
Display information about this module only.
Do not truncate module information at 80 characters.
Example 1 Displaying the Status of a Module
The following example displays the status of module 2:
example% modinfo -i 2
Id Loadaddr Size Info Rev Module Name
2 ff08e000 1734 - 1 swapgeneric (root and swap configuration)
Example 2 Displaying the Status of Kernel Modules
The following example displays the status of some kernel modules:
example% modinfo
Id Loadaddr Size Info Rev Module Name
2 ff08e000 1734 - 1 swapgeneric
4 ff07a000 3bc0 - 1 specfs (filesystem for specfs)
6 ff07dbc0 2918 - 1 TS (time sharing sched class)
7 ff0804d8 49c - 1 TS_DPTBL (Time sharing dispatch table)
8 ff04a000 24a30 2 1 ufs (filesystem for ufs)
9 ff080978 c640 226 1 rpcmod (RPC syscall)
9 ff080978 c640 - 1 rpcmod (rpc interface str mod)
10 ff08cfb8 2031c - 1 ip (IP Streams module)
10 ff08cfb8 2031c 2 1 ip (IP Streams device)
Example 3 Using the -c Option
Using the modinfo command with the -c option displays the number of instances of the module loaded and the module's current state.
example% modinfo -c Id Loadcnt Module Name State 1 0 krtld UNLOADED/UNINSTALLED 2 0 genunix UNLOADED/UNINSTALLED 3 0 platmod UNLOADED/UNINSTALLED 4 0 SUNW,UltraSPARC-IIi UNLOADED/UNINSTALLED 5 0 cl_bootstrap UNLOADED/UNINSTALLED 6 1 specfs LOADED/INSTALLED 7 1 swapgeneric UNLOADED/UNINSTALLED 8 1 TS LOADED/INSTALLED 9 1 TS_DPTBL LOADED/INSTALLED 10 1 ufs LOADED/INSTALLED 11 1 fssnap_if LOADED/INSTALLED
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Evolving |
modload(1M), modunload(1M), attributes(5)