Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

kldstat bug?

0 views
Skip to first unread message

James R. Van Artsdalen

unread,
Nov 21, 2009, 3:10:17 PM11/21/09
to FreeBSD Current
amd64, svn 199260, November 13, 2009

Is this behavior of kldstat a bug? Some modules found, some not, and
the Id field differs even in success.

# kldstat
Id Refs Address Size Name
1 19 0xffffffff80100000 f15ee8 kernel
2 1 0xffffffff81016000 194220 zfs.ko
3 2 0xffffffff811ab000 3928 opensolaris.ko
4 1 0xffffffff811af000 24560 geom_mirror.ko
5 1 0xffffffff811d4000 9ac0 siis.ko
6 1 0xffffffff811de000 d0a8 ahci.ko
# kldstat -m zfs
Id Refs Name
3 1 zfs
# kldstat -m opensolaris
Id Refs Name
1 1 opensolaris
# kldstat -m geom_mirror
kldstat: can't find module geom_mirror: No such file or directory
# kldstat -m siis
kldstat: can't find module siis: No such file or directory
# kldstat -m ahci
kldstat: can't find module ahci: No such file or directory
#

_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-curre...@freebsd.org"

David Horn

unread,
Nov 21, 2009, 8:52:19 PM11/21/09
to James R. Van Artsdalen, FreeBSD Current

If you try using kldstat -v (verbose), you will likely understand a
little better.

There is a file id (for kernel modules *files* like siis.ko), and
there are module ids (for individual modules within the kernel module
file). The relationship is not necessarily 1:1, as there can be more
than 1 module per kernel module file).

For example:

24 1 0xffffffff810a1000 3c13 siis.ko (/boot/kernel/siis.ko)
Contains modules:
Id Name
440 siis/siisch
441 pci/siis

Notice that the kernel module file (siis.ko) has an id of 24, and the
modules in that file (siis/siisch and pci/siis) each have there own
module id (440 and 441 repectively).

If you would do a kldstat -m pci/siis you would be able to find that
since the -m flag requires a module name, not a kernel module file
name.

Yes, module name versus kernel module file name and file id vs module
id can cause confusion.

Good Luck.

---Dave

0 new messages