lsmod
Show the status of modules in the Linux Kernel
Runtime Kernel Module Dependency List (Text-Only)
Minimal Runtime Kernel Module Dependency View
Print a module header followed by who uses it:
Reverse view: module depends on
lsmod | awk '
NR==1 { next }
{
mod = $1
used = $4
if (used != "" && used != "-") {
n = split(used, a, ",")
for (i = 1; i <= n; i++)
if (a[i] != "")
dep[a[i]] = dep[a[i]] mod " "
}
}
END {
for (m in dep) {
print m
split(dep[m], a, " ")
for (i in a)
if (a[i] != "")
print " -> depends on:", a[i]
print ""
}
}
'
,