DEVD(8)
π DEVD(8) β device state change daemon π
okay bestie, this is the devd page from the System Managerβs Manual, section 8, and itβs literally the device state change daemon. no cap. β¨
πΈ NAME πΈ
devd β device state change daemon
β¨ SYNOPSIS β¨
devd [-dnq] [-f file] [-l num]
π DESCRIPTION π
okay so the devd daemon gives userland programs a way to run when certain kernel events happen. itβs giving βkernel says jump, userland says how highβ energy. π«
hereβs the option menu, bestie:
-dβ run in the foreground instead of becoming a daemon and log additional information for debugging.-f fileβ use configuration file file instead of the default/etc/devd.conf. if option-fis specified more than once, the last file specified is used.-l numβ limit concurrent socket connections to num. the default connection limit is10.-nβ do not process all pending events before becoming a daemon. instead, call daemon right away.-qβ quiet mode. only log messages at priorityLOG_WARNINGor above.
π¦ IMPLEMENTATION NOTES π¦
the devd utility is a system daemon that runs in the background all the time. whenever a device is added to or removed from the device tree, devd will execute actions specified in devd.conf(5). for example, devd might execute dhclient(8) when an Ethernet adapter is added to the system, and kill the dhclient(8) instance when the same adapter is removed. another example would be for devd to use a table to locate and load via kldload(8) the proper driver for an unrecognized device that is added to the system. iconic behavior, honestly. π
the devd utility hooks into the devctl(4) device driver. this device driver has hooks into the device configuration system. when nodes are added or deleted from the tree, this device will deliver information about the event to devd. once devd has parsed the message, it will search its action list for that kind of event and perform the action with the highest matching value. for most mundane uses, the default handlers are adequate. however, for more advanced users, the power is present to tweak every aspect of what happens. highkey customizable. π
the devd utility reads /etc/devd.conf or the alternate configuration file specified with a -f option and uses that file to drive the rest of the process. while the format of this file is described in devd.conf(5), some basics are covered here.
in the options section, one can define multiple directories to search for config files. the default config file specifies /etc/devd and /usr/local/etc/devd as directories to search. all files in these directories whose names match the pattern *.conf are parsed. these files are intended to be installed by third party vendors that wish to hook into the devd system without modifying the userβs other config files.
since devctl(4) allows only one active reader, devd multiplexes it, forwarding all events to any number of connected clients. clients connect by opening the SOCK_SEQPACKET Unix domain socket at /var/run/devd.seqpacket.pipe. slay, multiplexing queen. π
π FILES π
/etc/devd.confβ the defaultdevdconfiguration file./var/run/devd.seqpacket.pipeβ the socket used bydevdto communicate with its clients./var/run/devd.pipeβ a deprecated socket retained for use with old clients. itβs deprecated, so itβs giving legacy vibes only, bestie. π
π EXAMPLES π
want to monitor kernel events? use cat(1):
cat /var/run/devd.seqpacket.pipe
π SEE ALSO π
go read these too, iykyk. π
π§ HISTORY π§
the devd utility first appeared in FreeBSD 5.0. a whole icon since FreeBSD 5.0, fr fr. π«Ά
π AUTHORS π
M. Warner Losh
shoutout to M. Warner Losh, bestie. π
π«Ά sign-off: this page is from Debian, dated May 7, 2025, and the manual name is DEVD(8). thatβs the source/version, date, and name all wrapped up cute. periodt. π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 2002 M. Warner Losh <imp@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms