KLDSTAT(8)
π NAME π
okay so this is kldstat(8), straight outta the System Manager's Manual, and she is here to show you the status of anything dynamically linked into the kernel. π
kldstat β display status of dynamic kernel linker. periodt.
β¨ SYNOPSIS β¨
kldstat [-h] [-q] [-v] [-d] [-i id] [-n filename]
kldstat [-q] [-d] [-m modname]
πΈ DESCRIPTION πΈ
the kldstat utility displays the status of any files dynamically linked into the kernel. no cap, that's her whole job. π«Ά
here's the option menu, bestie:
-dβ shows the module specific data, literally asint,unsigned int, andunsigned long. data reveal slay. β¨-hβ displays the size field in a human-readable form, using unit suffixes instead of hex values. so much easier to read, iykyk. π-iid β displays the status of only the file with this ID.-mmodname β displays the status of only the module with thismodname.-nfilename β displays the status of only the file with thisfilename.-qβ quietly checks if the file is loaded or compiled into the kernel. stealth mode, no extra chatter. π€«-vβ be more verbose. give us the extra tea. π
π EXIT STATUS π
the kldstat utility exits 0 on success, and >0 if an error occurs. simple as that, bestie. π
π¦ EXAMPLES π¦
show files dynamically linked into the kernel. pro tip from the page: the kernel itself is shown in the list too, and Refs shows the number of modules referenced by each file:
$ kldstat
Id Refs Address Size Name
1 38 0xffffffff80200000 2448f20 kernel
2 3 0xffffffff82649000 b7bd8 linux.ko
3 5 0xffffffff82701000 9698 linux_common.ko
4 1 0xffffffff82b11000 1eae linsysfs.ko
5 1 0xffffffff82b13000 f2af8 nvidia-modeset.ko
6 1 0xffffffff82c06000 122b020 nvidia.ko
7 1 0xffffffff83e32000 2668 intpm.ko
8 1 0xffffffff83e35000 b50 smbus.ko
9 1 0xffffffff83e36000 18a0 uhid.ko
10 1 0xffffffff83e38000 2928 ums.ko
11 1 0xffffffff83e3b000 1aa0 wmt.ko
12 1 0xffffffff83e3d000 cd70 snd_uaudio.ko
show the verbose status of the linux file and show the size in a human readable fashion. say less:
$ kldstat -h -v -n linux
Id Refs Address Size Name
2 3 0xffffffff82649000 735K linux.ko (/boot/kernel/linux.ko)
Contains modules:
Id Name
2 linuxelf
same energy as above, but using the id of the file:
$ kldstat -h -i 2 -v
Id Refs Address Size Name
2 3 0xffffffff82649000 735K linux.ko (/boot/kernel/linux.ko)
Contains modules:
Id Name
2 linuxelf
show the status of the linuxelf module obtained from the example above:
$ kldstat -v -m linuxelf
Id Refs Name
2 1 linuxelf
show the module specific data for the g_raid module:
$ kldstat -d -m g_raid
Id Refs Name data..(int, uint, ulong)
366 1 g_raid (0, 0, 0x0)
check if the module fakefile is linked. returns 0 if it is, 1 otherwise:
$ kldstat -q -n fakefile || echo file not linked
file not linked
π SEE ALSO π
π HISTORY π
the kldstat utility first appeared in FreeBSD 3.0, replacing the lkm interface. iconic behavior, honestly. β
π AUTHORS π
Doug Rabson <dfr@FreeBSD.org>
okay that's the whole page, bestie π«Ά β this KLDSTAT(8) manual is Debian flavored and dated January 4, 2025. mwah π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- π the page's license: BSD-2-Clause
- Copyright (c) 1997 Doug Rabson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms