Commands to list kernel module information
Command modinfo extracts information from the Linux Kernel modules given on the command line. This is not just useful to find out about information about loaded modules but it can be use to identify modules inserted by crackers/hackers (try less /proc/modules). Also following is also good to verify output reported by ps ax :
# ps ax | wc -l
77
# ls -d /proc/* | grep [0-9]|wc -l
78
Usually rootkit install their own ps command, which hides kernel modules. If second output is larger than the first (ps ax) command output take a closer look at your server.
Back to our main question, the modinfo command outputs following information for each module:
=> Module Author
=> Module description
=> License
=> Parameter and filename
Task: Display list of modules
$ lsmod
$ less /proc/modules
Task: Display information about ide-cd module
$ /sbin/modinfo ide-cd
Category: Linux Administration
